diff --git a/internal/pkg/common/interfaces.go b/internal/pkg/common/interfaces.go
index e1ef21f..39b37ba 100755
--- a/internal/pkg/common/interfaces.go
+++ b/internal/pkg/common/interfaces.go
@@ -21,6 +21,7 @@
 	"context"
 	"time"
 
+	me "github.com/opencord/omci-lib-go/v2/generated"
 	"github.com/opencord/voltha-lib-go/v7/pkg/db"
 	"github.com/opencord/voltha-lib-go/v7/pkg/events/eventif"
 	"github.com/opencord/voltha-openonu-adapter-go/internal/pkg/devdb"
@@ -138,10 +139,7 @@
 	IncrementMibDataSync(context.Context)
 
 	GetActiveImageMeID(context.Context) (uint16, error)
-	LockMutexOnuSwImageIndications()
-	UnlockMutexOnuSwImageIndications()
-	GetOnuSwImageIndications() SswImageIndications
-	SetOnuSwImageIndications(SswImageIndications)
+	HandleSwImageIndications(context.Context, uint16, me.AttributeValueMap)
 	GetPersActiveSwVersion() string
 	SetPersActiveSwVersion(string)
 	GetActiveImageVersion(context.Context) string
diff --git a/internal/pkg/mib/mib_sync.go b/internal/pkg/mib/mib_sync.go
index 03937c4..d3f2712 100755
--- a/internal/pkg/mib/mib_sync.go
+++ b/internal/pkg/mib/mib_sync.go
@@ -752,7 +752,7 @@
 						oo.deviceID, entityID)
 				}
 				// need to use function for go lint complexity
-				oo.handleSwImageIndications(ctx, entityID, meAttributes)
+				oo.HandleSwImageIndications(ctx, entityID, meAttributes)
 				return nil
 			case "IpHostConfigData":
 				oo.mutexLastTxParamStruct.RUnlock()
@@ -795,7 +795,8 @@
 	return err
 }
 
-func (oo *OnuDeviceEntry) handleSwImageIndications(ctx context.Context, entityID uint16, meAttributes me.AttributeValueMap) {
+//HandleSwImageIndications updates onuSwImageIndications with the ONU data just received
+func (oo *OnuDeviceEntry) HandleSwImageIndications(ctx context.Context, entityID uint16, meAttributes me.AttributeValueMap) {
 	imageIsCommitted := meAttributes["IsCommitted"].(uint8)
 	imageIsActive := meAttributes["IsActive"].(uint8)
 	imageVersion := cmn.TrimStringFromMeOctet(meAttributes["Version"])
diff --git a/internal/pkg/mib/onu_device_entry.go b/internal/pkg/mib/onu_device_entry.go
index e956622..26c346d 100755
--- a/internal/pkg/mib/onu_device_entry.go
+++ b/internal/pkg/mib/onu_device_entry.go
@@ -945,26 +945,6 @@
 	return oo.omciRebootMessageReceivedChannel
 }
 
-// LockMutexOnuSwImageIndications - TODO: add comment
-func (oo *OnuDeviceEntry) LockMutexOnuSwImageIndications() {
-	oo.mutexOnuSwImageIndications.Lock()
-}
-
-// UnlockMutexOnuSwImageIndications - TODO: add comment
-func (oo *OnuDeviceEntry) UnlockMutexOnuSwImageIndications() {
-	oo.mutexOnuSwImageIndications.Unlock()
-}
-
-// GetOnuSwImageIndications - TODO: add comment
-func (oo *OnuDeviceEntry) GetOnuSwImageIndications() cmn.SswImageIndications {
-	return oo.onuSwImageIndications
-}
-
-// SetOnuSwImageIndications - TODO: add comment
-func (oo *OnuDeviceEntry) SetOnuSwImageIndications(value cmn.SswImageIndications) {
-	oo.onuSwImageIndications = value
-}
-
 // GetPersActiveSwVersion - TODO: add comment
 func (oo *OnuDeviceEntry) GetPersActiveSwVersion() string {
 	oo.MutexPersOnuConfig.RLock()
diff --git a/internal/pkg/swupg/onu_image_status.go b/internal/pkg/swupg/onu_image_status.go
index 0da9e0b..eb4021f 100755
--- a/internal/pkg/swupg/onu_image_status.go
+++ b/internal/pkg/swupg/onu_image_status.go
@@ -109,7 +109,6 @@
 		images.Items = append(images.Items, &image)
 	}
 	logger.Debugw(ctx, "images of the ONU", log.Fields{"images": images})
-	oo.updateOnuSwImageIndications(ctx, &images)
 	oo.updateOnuSwImagePersistentData(ctx)
 	return &images, nil
 }
@@ -214,15 +213,16 @@
 	meAttributes := msgObj.Attributes
 	logger.Debugw(ctx, "processAttributesReceived", log.Fields{"attributes": meAttributes, "device-id": oo.deviceID})
 
-	for k := range oo.requestedAttributes {
-
-		if msgObj.Result != me.Success && k != cImgProductCode && k != cImgImageHash {
+	if _, ok := oo.requestedAttributes[cImgVersion]; ok {
+		if msgObj.Result != me.Success {
 			logger.Errorw(ctx, "processAttributesReceived retrieval of mandatory attributes failed",
 				log.Fields{"device-id": oo.deviceID})
 			return fmt.Errorf("process-image-status-response-error")
 		}
+		oo.pDevEntry.HandleSwImageIndications(ctx, msgObj.EntityInstance, meAttributes)
+	}
+	for k := range oo.requestedAttributes {
 		switch k {
-
 		// mandatory attributes
 		case cImgIsCommitted:
 			if meAttributes[cImgIsCommitted].(uint8) == cmn.SwIsCommitted {
@@ -270,50 +270,6 @@
 	return nil
 }
 
-func (oo *OnuImageStatus) updateOnuSwImageIndications(ctx context.Context, images *voltha.OnuImages) {
-
-	oo.pDevEntry.LockMutexOnuSwImageIndications()
-	onuSwImageIndications := oo.pDevEntry.GetOnuSwImageIndications()
-	validActiveImageFound := false
-	for i := cmn.FirstSwImageMeID; i <= cmn.SecondSwImageMeID; i++ {
-		if images.Items[i].IsActive && images.Items[i].IsValid {
-			onuSwImageIndications.ActiveEntityEntry.EntityID = uint16(i)
-			onuSwImageIndications.ActiveEntityEntry.Valid = images.Items[i].IsValid
-			onuSwImageIndications.ActiveEntityEntry.Version = images.Items[i].Version
-			if images.Items[i].IsCommited {
-				onuSwImageIndications.ActiveEntityEntry.IsCommitted = cmn.SwIsCommitted
-			} else {
-				onuSwImageIndications.ActiveEntityEntry.IsCommitted = cmn.SwIsUncommitted
-			}
-			validActiveImageFound = true
-			break
-		}
-	}
-	if !validActiveImageFound {
-		onuSwImageIndications.ActiveEntityEntry.Valid = false
-	}
-	validInactiveImageFound := false
-	for i := cmn.FirstSwImageMeID; i <= cmn.SecondSwImageMeID; i++ {
-		if !images.Items[i].IsActive && images.Items[i].IsValid {
-			onuSwImageIndications.InActiveEntityEntry.EntityID = uint16(i)
-			onuSwImageIndications.InActiveEntityEntry.Valid = images.Items[i].IsValid
-			onuSwImageIndications.InActiveEntityEntry.Version = images.Items[i].Version
-			if images.Items[i].IsCommited {
-				onuSwImageIndications.InActiveEntityEntry.IsCommitted = cmn.SwIsCommitted
-			} else {
-				onuSwImageIndications.InActiveEntityEntry.IsCommitted = cmn.SwIsUncommitted
-			}
-			validInactiveImageFound = true
-			break
-		}
-	}
-	if !validInactiveImageFound {
-		onuSwImageIndications.InActiveEntityEntry.Valid = false
-	}
-	oo.pDevEntry.SetOnuSwImageIndications(onuSwImageIndications)
-	oo.pDevEntry.UnlockMutexOnuSwImageIndications()
-}
-
 func (oo *OnuImageStatus) updateOnuSwImagePersistentData(ctx context.Context) {
 
 	activeImageVersion := oo.pDevEntry.GetActiveImageVersion(ctx)
