diff --git a/ibm_vpd_utils.cpp b/ibm_vpd_utils.cpp
index 25960fc..4eb99cb 100644
--- a/ibm_vpd_utils.cpp
+++ b/ibm_vpd_utils.cpp
@@ -387,9 +387,12 @@
     {
         auto js = json::parse(systemJson);
 
-        const string hwKeyword = getHW(vpdMap);
+        string hwKeyword = getHW(vpdMap);
         const string imKeyword = getIM(vpdMap);
 
+        transform(hwKeyword.begin(), hwKeyword.end(), hwKeyword.begin(),
+                  ::toupper);
+
         if (js.find("system") == js.end())
         {
             throw runtime_error("Invalid systems Json");
@@ -405,9 +408,30 @@
 
         if ((js["system"][imKeyword].find("constraint") !=
              js["system"][imKeyword].end()) &&
-            (hwKeyword == js["system"][imKeyword]["constraint"]["HW"]))
+            js["system"][imKeyword]["constraint"].find("HW") !=
+                js["system"][imKeyword]["constraint"].end())
         {
-            jsonName = js["system"][imKeyword]["constraint"]["json"];
+            // collect hw versions from json, and check hwKeyword  is part of it
+            // if hwKeyword is found there then load respective json
+            // otherwise load default one.
+            for (const auto& hwVersion :
+                 js["system"][imKeyword]["constraint"]["HW"])
+            {
+                string hw = hwVersion;
+                transform(hw.begin(), hw.end(), hw.begin(), ::toupper);
+
+                if (hw == hwKeyword)
+                {
+                    jsonName = js["system"][imKeyword]["constraint"]["json"];
+                    break;
+                }
+            }
+
+            if (jsonName.empty() && js["system"][imKeyword].find("default") !=
+                                        js["system"][imKeyword].end())
+            {
+                jsonName = js["system"][imKeyword]["default"];
+            }
         }
         else if (js["system"][imKeyword].find("default") !=
                  js["system"][imKeyword].end())
