diff --git a/src/test/cord-api/Framework/utils/utils.py b/src/test/cord-api/Framework/utils/utils.py
index c807189..04c94f9 100644
--- a/src/test/cord-api/Framework/utils/utils.py
+++ b/src/test/cord-api/Framework/utils/utils.py
@@ -28,25 +28,35 @@
              dict2 = retrieved data from GET method
     returns True if contents of dict1 exists in dict2
     '''
-
-    @staticmethod
-    def compare_dict(dict1, dict2):
-        print "input_data", dict1
+    def compare_dict(self, dict1, dict2):
+        print "input data", dict1
         print "get data", dict2
         if dict1 == None or dict2 == None:
            return False
-
         if type(dict1) is not dict or type(dict2) is not dict:
            return False
+        if dict1 == {}:
+            return True
+        return self.compare_dict_recursive(dict1, dict2)
 
+    '''
+    @method compare_dict_recursive
+    @Description: recursive function to validate if dict1 is a subset of dict2
+    returns True if contents of dict1 exists in dict2
+    '''
+    def compare_dict_recursive(self, dict1, dict2):
         for key1,value1 in dict1.items():
-            try:
-                if key1 in dict2:
-                   for key2, value2 in value1.items():
-                       if value2 != dict2[key1][key2]:
-                          return False
-            except:
-	        print "Additional items"
+            if key1 not in dict2.keys():
+                print "Missing key", key1, "in dict2"
+                return False
+            value2 = dict2[key1]
+            if type(value1) is dict and type(value2) is dict:
+                if not self.compare_dict_recursive(value1, value2):
+                    return False
+            else:
+                if value2 != value1:
+                    print "Values of key", key1, "in two dicts are not equal"
+                    return False
         return True
 
     '''
