diff --git a/VERSION b/VERSION
index 503e438..d466a42 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.0.2-dev1
+0.0.2-dev2
diff --git a/internal/pkg/application/vnets_test.go b/internal/pkg/application/vnets_test.go
index f224278..d0f56ae 100644
--- a/internal/pkg/application/vnets_test.go
+++ b/internal/pkg/application/vnets_test.go
@@ -690,7 +690,6 @@
 				appMock := mocks.NewMockApp(gomock.NewController(t))
 				cntlr.NewController(ctx, appMock)
 				vc := cntlr.GetController()
-				dev := map[string]*cntlr.Device{}
 				portsByName := map[string]*cntlr.DevicePort{}
 				portsByName["16777472"] = &cntlr.DevicePort{
 					Name:  "16777472",
@@ -701,8 +700,7 @@
 					ID:          "SDX6320031",
 					PortsByName: portsByName,
 				}
-				dev["SDX6320031"] = device
-				vc.Devices = dev
+				vc.Devices.Store("SDX6320031", device)
 				va.DeleteDevFlowForVlanFromDevice(tt.args.cntx, tt.args.vnet, tt.args.deviceSerialNum)
 			case "DeleteDevFlowForVlanFromDevice_PortStateDown":
 				voltDev.Name = ""
@@ -713,7 +711,6 @@
 				appMock := mocks.NewMockApp(gomock.NewController(t))
 				cntlr.NewController(ctx, appMock)
 				vc := cntlr.GetController()
-				dev := map[string]*cntlr.Device{}
 				portsByName := map[string]*cntlr.DevicePort{}
 				portsByName["16777472"] = &cntlr.DevicePort{
 					Name:  "16777472",
@@ -724,8 +721,7 @@
 					ID:          "SDX6320031",
 					PortsByName: portsByName,
 				}
-				dev["SDX6320031"] = device
-				vc.Devices = dev
+				vc.Devices.Store("SDX6320031", device)
 				va.DeleteDevFlowForVlanFromDevice(tt.args.cntx, tt.args.vnet, tt.args.deviceSerialNum)
 			}
 		})
@@ -834,7 +830,6 @@
 				appMock := mocks.NewMockApp(gomock.NewController(t))
 				cntlr.NewController(ctx, appMock)
 				vc := cntlr.GetController()
-				dev := map[string]*cntlr.Device{}
 				portsByName := map[string]*cntlr.DevicePort{}
 				portsByName["16777472"] = &cntlr.DevicePort{
 					Name:  "16777472",
@@ -845,8 +840,7 @@
 					ID:          "SDX6320031",
 					PortsByName: portsByName,
 				}
-				dev["SDX6320031"] = device
-				vc.Devices = dev
+				vc.Devices.Store("SDX6320031", device)
 				va.DeleteDevFlowForDevice(tt.args.cntx, tt.args.device)
 			}
 		})
@@ -1657,7 +1651,6 @@
 			appMock := mocks.NewMockApp(gomock.NewController(t))
 			cntlr.NewController(ctx, appMock)
 			vc := cntlr.GetController()
-			dev := map[string]*cntlr.Device{}
 			portsByName := map[string]*cntlr.DevicePort{}
 			portsByName["16777472"] = &cntlr.DevicePort{
 				Name: "16777472",
@@ -1667,8 +1660,7 @@
 				ID:          deviceName,
 				PortsByName: portsByName,
 			}
-			dev["SDX6320031"] = device
-			vc.Devices = dev
+			vc.Devices.Store("SDX6320031", device)
 			switch tt.name {
 			case "AddUsArpFlows":
 				if err := vpv.AddUsArpFlows(tt.args.cntx); (err != nil) != tt.wantErr {
@@ -1787,9 +1779,7 @@
 				device := &cntlr.Device{
 					ID: "SDX6320031",
 				}
-				dev := map[string]*cntlr.Device{}
-				dev["SDX6320031"] = device
-				vc.Devices = dev
+				vc.Devices.Store("SDX6320031", device)
 				if err := vpv.AddDsDhcpFlows(tt.args.cntx); (err != nil) != tt.wantErr {
 					t.Errorf("VoltPortVnet.AddDsDhcpFlows() error = %v, wantErr %v", err, tt.wantErr)
 				}
@@ -1867,9 +1857,7 @@
 				device := &cntlr.Device{
 					ID: "SDX6320031",
 				}
-				dev := map[string]*cntlr.Device{}
-				dev["SDX6320031"] = device
-				vc.Devices = dev
+				vc.Devices.Store("SDX6320031", device)
 				if err := vpv.AddUsDhcpFlows(tt.args.cntx); (err != nil) != tt.wantErr {
 					t.Errorf("VoltPortVnet.AddDsDhcpFlows() error = %v, wantErr %v", err, tt.wantErr)
 				}
@@ -1979,7 +1967,6 @@
 				appMock := mocks.NewMockApp(gomock.NewController(t))
 				cntlr.NewController(ctx, appMock)
 				vc := cntlr.GetController()
-				dev := map[string]*cntlr.Device{}
 				portsByName := map[string]*cntlr.DevicePort{}
 				portsByName["16777472"] = &cntlr.DevicePort{
 					Name: "16777472",
@@ -1989,8 +1976,7 @@
 					ID:          "SDX6320031",
 					PortsByName: portsByName,
 				}
-				dev["SDX6320031"] = device
-				vc.Devices = dev
+				vc.Devices.Store("SDX6320031", device)
 				if err := vpv.AddDsPppoeFlows(tt.args.cntx); (err != nil) != tt.wantErr {
 					t.Errorf("VoltPortVnet.AddUsPppoeFlows() error = %v, wantErr %v", err, tt.wantErr)
 				}
@@ -2485,7 +2471,6 @@
 	appMock := mocks.NewMockApp(gomock.NewController(t))
 	controller.NewController(ctx, appMock)
 	vc := cntlr.GetController()
-	dev := map[string]*cntlr.Device{}
 	portsByName := map[string]*cntlr.DevicePort{}
 	portsByName["16777472"] = &cntlr.DevicePort{
 		Name: "16777472",
@@ -2495,8 +2480,7 @@
 		ID:          deviceName,
 		PortsByName: portsByName,
 	}
-	dev["SDX6320031"] = device
-	vc.Devices = dev
+	vc.Devices.Store("SDX6320031", device)
 	tests := []struct {
 		name    string
 		args    args
@@ -2595,7 +2579,6 @@
 				appMock := mocks.NewMockApp(gomock.NewController(t))
 				cntlr.NewController(ctx, appMock)
 				vc := cntlr.GetController()
-				dev := map[string]*cntlr.Device{}
 				portsByName := map[string]*cntlr.DevicePort{}
 				portsByName["16777472"] = &cntlr.DevicePort{
 					Name:  "16777472",
@@ -2606,8 +2589,7 @@
 					ID:          "SDX6320031",
 					PortsByName: portsByName,
 				}
-				dev["SDX6320031"] = device
-				vc.Devices = dev
+				vc.Devices.Store("SDX6320031", device)
 				va.DeleteDevFlowForVlan(tt.args.cntx, tt.args.vnet)
 			case "DeleteDevFlowForVlan_PortStateDown":
 				voltDev.Name = ""
@@ -2618,7 +2600,6 @@
 				appMock := mocks.NewMockApp(gomock.NewController(t))
 				cntlr.NewController(ctx, appMock)
 				vc := cntlr.GetController()
-				dev := map[string]*cntlr.Device{}
 				portsByName := map[string]*cntlr.DevicePort{}
 				portsByName["16777472"] = &cntlr.DevicePort{
 					Name:  "16777472",
@@ -2629,8 +2610,7 @@
 					ID:          "SDX6320031",
 					PortsByName: portsByName,
 				}
-				dev["SDX6320031"] = device
-				vc.Devices = dev
+				vc.Devices.Store("SDX6320031", device)
 				va.DeleteDevFlowForVlan(tt.args.cntx, tt.args.vnet)
 			}
 		})
diff --git a/internal/pkg/controller/controller.go b/internal/pkg/controller/controller.go
index 7d974f8..d04e00e 100644
--- a/internal/pkg/controller/controller.go
+++ b/internal/pkg/controller/controller.go
@@ -68,7 +68,7 @@
 	BlockedDeviceList       *util.ConcurrentMap
 	deviceTaskQueue         *util.ConcurrentMap
 	vagent                  map[string]*vpagent.VPAgent
-	Devices                 map[string]*Device
+	Devices                 sync.Map
 	rebootInProgressDevices map[string]string
 	deviceLock              sync.RWMutex
 	rebootLock              sync.Mutex
@@ -85,7 +85,6 @@
 	var controller VoltController
 
 	controller.rebootInProgressDevices = make(map[string]string)
-	controller.Devices = make(map[string]*Device)
 	controller.deviceLock = sync.RWMutex{}
 	controller.ctx = ctx
 	controller.app = app
@@ -125,7 +124,7 @@
 // AddDevice to add device
 func (v *VoltController) AddDevice(cntx context.Context, config *intf.VPClientCfg) intf.IVPClient {
 	d := NewDevice(cntx, config.DeviceID, config.SerialNum, config.VolthaClient, config.SouthBoundID, config.MfrDesc, config.HwDesc, config.SwDesc)
-	v.Devices[config.DeviceID] = d
+	v.Devices.Store(config.DeviceID, d)
 	v.app.AddDevice(cntx, d.ID, d.SerialNum, config.SouthBoundID)
 
 	d.RestoreMetersFromDb(cntx)
@@ -142,13 +141,17 @@
 
 // DelDevice to delete device
 func (v *VoltController) DelDevice(cntx context.Context, id string) {
-	d, ok := v.Devices[id]
+	var device *Device
+	d, ok := v.Devices.Load(id)
 	if ok {
-		delete(v.Devices, id)
-		d.Delete()
+		v.Devices.Delete(id)
+		device, ok = d.(*Device)
+		if ok {
+			device.Delete()
+		}
 	}
 	v.app.DelDevice(cntx, id)
-	d.cancel() // To stop the device tables sync routine
+	device.cancel() // To stop the device tables sync routine
 	logger.Debugw(ctx, "Deleted device", log.Fields{"Device": id})
 }
 
@@ -176,9 +179,14 @@
 
 // GetDevice to get device info
 func (v *VoltController) GetDevice(id string) (*Device, error) {
-	d, ok := v.Devices[id]
+	var device *Device
+	d, ok := v.Devices.Load(id)
+	if !ok {
+		return nil, errorCodes.ErrDeviceNotFound
+	}
+	device, ok = d.(*Device)
 	if ok {
-		return d, nil
+		return device, nil
 	}
 	return nil, errorCodes.ErrDeviceNotFound
 }
@@ -593,45 +601,66 @@
 // GetAllFlows returns list of all flows
 func (v *VoltController) GetAllFlows() ([]*of.VoltSubFlow, error) {
 	var flows []*of.VoltSubFlow
-	for _, d := range v.Devices {
-		flows = append(flows, d.GetAllFlows()...)
-	}
+	v.Devices.Range(func(_, value interface{}) bool {
+		d, ok := value.(*Device)
+		if ok {
+			flows = append(flows, d.GetAllFlows()...)
+		}
+		return true
+	})
 	return flows, nil
 }
 
 // GetAllPendingFlows returns list of all flows
 func (v *VoltController) GetAllPendingFlows() ([]*of.VoltSubFlow, error) {
 	var flows []*of.VoltSubFlow
-	for _, d := range v.Devices {
-		flows = append(flows, d.GetAllPendingFlows()...)
-	}
+	v.Devices.Range(func(_, value interface{}) bool {
+		d, ok := value.(*Device)
+		if ok {
+			flows = append(flows, d.GetAllPendingFlows()...)
+		}
+		return true
+	})
 	return flows, nil
 }
 func (v *VoltController) GetAllMeterInfo() (map[string][]*of.Meter, error) {
 	logger.Info(ctx, "Entering into GetAllMeterInfo method")
 	meters := map[string][]*of.Meter{}
-	for _, device := range v.Devices {
-		logger.Debugw(ctx, "Inside GetAllMeterInfo method", log.Fields{"deviceId": device.ID, "southbound": device.SouthBoundID, "serial no": device.SerialNum})
-		for _, meter := range device.meters {
-			meters[device.ID] = append(meters[device.ID], meter)
+	v.Devices.Range(func(_, value interface{}) bool {
+		device, ok := value.(*Device)
+		if ok {
+			logger.Debugw(ctx, "Inside GetAllMeterInfo method", log.Fields{"deviceId": device.ID, "southbound": device.SouthBoundID, "serial no": device.SerialNum})
+			for _, meter := range device.meters {
+				meters[device.ID] = append(meters[device.ID], meter)
+			}
+			logger.Debugw(ctx, "Inside GetAllMeterInfo method", log.Fields{"meters": meters})
 		}
-		logger.Debugw(ctx, "Inside GetAllMeterInfo method", log.Fields{"meters": meters})
-	}
+		return true
+	})
 	return meters, nil
 }
 
 func (v *VoltController) GetMeterInfo(cntx context.Context, id uint32) (map[string]*of.Meter, error) {
 	logger.Info(ctx, "Entering into GetMeterInfo method")
 	meters := map[string]*of.Meter{}
-	for _, device := range v.Devices {
-		logger.Debugw(ctx, "Inside GetMeterInfo method", log.Fields{"deviceId": device.ID})
-		meter, err := device.GetMeter(id)
-		if err != nil {
-			logger.Errorw(ctx, "Failed to fetch the meter", log.Fields{"Reason": err.Error()})
-			return nil, err
+	var errResult error
+	v.Devices.Range(func(_, value interface{}) bool {
+		device, ok := value.(*Device)
+		if ok {
+			logger.Debugw(ctx, "Inside GetMeterInfo method", log.Fields{"deviceId": device.ID})
+			meter, err := device.GetMeter(id)
+			if err != nil {
+				logger.Errorw(ctx, "Failed to fetch the meter", log.Fields{"Reason": err.Error()})
+				errResult = err
+				return false
+			}
+			meters[device.ID] = meter
+			logger.Debugw(ctx, "meters", log.Fields{"Meter": meters})
 		}
-		meters[device.ID] = meter
-		logger.Debugw(ctx, "meters", log.Fields{"Meter": meters})
+		return true
+	})
+	if errResult != nil {
+		return nil, errResult
 	}
 	return meters, nil
 }
@@ -639,20 +668,24 @@
 func (v *VoltController) GetGroupList() ([]*of.Group, error) {
 	logger.Info(ctx, "Entering into GetGroupList method")
 	groups := []*of.Group{}
-	for _, device := range v.Devices {
-		device.groups.Range(func(key, value interface{}) bool {
-			groupID := key.(uint32)
-			logger.Debugw(ctx, "Inside GetGroupList method", log.Fields{"groupID": groupID})
-			//Obtain all groups associated with the device
-			grps, ok := device.groups.Load(groupID)
-			if !ok {
+	v.Devices.Range(func(_, value interface{}) bool {
+		device, ok := value.(*Device)
+		if ok {
+			device.groups.Range(func(key, value interface{}) bool {
+				groupID := key.(uint32)
+				logger.Debugw(ctx, "Inside GetGroupList method", log.Fields{"groupID": groupID})
+				//Obtain all groups associated with the device
+				grps, ok := device.groups.Load(groupID)
+				if !ok {
+					return true
+				}
+				grp := grps.(*of.Group)
+				groups = append(groups, grp)
 				return true
-			}
-			grp := grps.(*of.Group)
-			groups = append(groups, grp)
-			return true
-		})
-	}
+			})
+		}
+		return true
+	})
 	logger.Debugw(ctx, "Groups", log.Fields{"groups": groups})
 	return groups, nil
 }
@@ -660,14 +693,23 @@
 func (v *VoltController) GetGroups(cntx context.Context, id uint32) (*of.Group, error) {
 	logger.Info(ctx, "Entering into GetGroupList method")
 	var groups *of.Group
-	for _, device := range v.Devices {
-		logger.Debugw(ctx, "Inside GetGroupList method", log.Fields{"groupID": id})
-		grps, ok := device.groups.Load(id)
-		if !ok {
-			return nil, errors.New("group not found")
+	var err error
+	v.Devices.Range(func(_, value interface{}) bool {
+		device, ok := value.(*Device)
+		if ok {
+			logger.Debugw(ctx, "Inside GetGroupList method", log.Fields{"groupID": id})
+			grps, ok := device.groups.Load(id)
+			if !ok {
+				err = errors.New("group not found")
+				return false
+			}
+			groups = grps.(*of.Group)
+			logger.Debugw(ctx, "Groups", log.Fields{"groups": groups})
 		}
-		groups = grps.(*of.Group)
-		logger.Debugw(ctx, "Groups", log.Fields{"groups": groups})
+		return true
+	})
+	if err != nil {
+		return nil, err
 	}
 	return groups, nil
 }
diff --git a/internal/pkg/controller/controller_test.go b/internal/pkg/controller/controller_test.go
index 5b67d14..18b16bc 100644
--- a/internal/pkg/controller/controller_test.go
+++ b/internal/pkg/controller/controller_test.go
@@ -71,8 +71,8 @@
 		ID:     "SDX6320031",
 		cancel: Cancel,
 	}
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	appMock := mocks.NewMockApp(gomock.NewController(t))
 	NewController(ctx, appMock)
 	appMock.EXPECT().DelDevice(gomock.Any(), gomock.Any()).AnyTimes()
@@ -91,9 +91,13 @@
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
-				Devices: dev,
+				Devices: sync.Map{},
 				app:     GetController().app,
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			v.DelDevice(tt.args.cntx, tt.args.id)
 		})
 	}
@@ -137,8 +141,8 @@
 		flows:       subFlows,
 		PortsByName: portsByName,
 	}
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	flow := &of.VoltFlow{
 		PortName:      "SDX6320031-1",
 		PortID:        256,
@@ -163,8 +167,12 @@
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
-				Devices: dev,
+				Devices: sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			if err := v.AddFlows(tt.args.cntx, tt.args.port, tt.args.device, tt.args.flow); (err != nil) != tt.wantErr {
 				t.Errorf("VoltController.AddFlows() error = %v, wantErr %v", err, tt.wantErr)
 			}
@@ -210,8 +218,8 @@
 		flows:       subFlows,
 		PortsByName: portsByName,
 	}
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	flow := &of.VoltFlow{
 		PortName:      "SDX6320031-1",
 		PortID:        256,
@@ -236,8 +244,12 @@
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
-				Devices: dev,
+				Devices: sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			if err := v.DelFlows(tt.args.cntx, tt.args.port, tt.args.device, tt.args.flow, false); (err != nil) != tt.wantErr {
 				t.Errorf("VoltController.DelFlows() error = %v, wantErr %v", err, tt.wantErr)
 			}
@@ -261,8 +273,8 @@
 		State:   1,
 		SetVlan: of.VlanAny,
 	}
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	tests := []struct {
 		name    string
 		args    args
@@ -292,8 +304,12 @@
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
-				Devices: dev,
+				Devices: sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			switch tt.name {
 			case "VoltController_GetGroups":
 				device.groups.Store(uint32(256), grp)
@@ -333,8 +349,8 @@
 		SetVlan: of.VlanAny,
 	}
 	grpList = append(grpList, grp)
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	tests := []struct {
 		name    string
 		want    []*of.Group
@@ -349,8 +365,12 @@
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
-				Devices: dev,
+				Devices: sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			device.groups.Store(uint32(256), grp)
 			got, err := v.GetGroupList()
 			if (err != nil) != tt.wantErr {
@@ -382,8 +402,8 @@
 		ID:     "SDX6320031",
 		meters: devMtr,
 	}
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	tests := []struct {
 		name    string
 		args    args
@@ -412,8 +432,12 @@
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
-				Devices: dev,
+				Devices: sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			switch tt.name {
 			case "VoltController_GetMeterInfo":
 				got, err := v.GetMeterInfo(tt.args.cntx, tt.args.id)
@@ -454,8 +478,8 @@
 		ID:     "SDX6320031",
 		meters: devMtr,
 	}
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	tests := []struct {
 		name    string
 		want    map[string][]*of.Meter
@@ -470,8 +494,12 @@
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
-				Devices: dev,
+				Devices: sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			got, err := v.GetAllMeterInfo()
 			if (err != nil) != tt.wantErr {
 				t.Errorf("VoltController.GetAllMeterInfo() error = %v, wantErr %v", err, tt.wantErr)
@@ -512,8 +540,8 @@
 		ID:    "SDX6320031",
 		flows: subFlows,
 	}
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	tests := []struct {
 		name    string
 		want    []*of.VoltSubFlow
@@ -582,8 +610,12 @@
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
-				Devices: dev,
+				Devices: sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			got, err := v.GetAllPendingFlows()
 			if (err != nil) != tt.wantErr {
 				t.Errorf("VoltController.GetAllPendingFlows() error = %v, wantErr %v", err, tt.wantErr)
@@ -601,8 +633,12 @@
 	for _, tt := range tests1 {
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
-				Devices: dev,
+				Devices: sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			switch tt.name {
 			case "GetFlows_with_DeviceID":
 				got, err := v.GetFlows(tt.args.deviceId)
@@ -624,8 +660,12 @@
 	for _, tt := range tests2 {
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
-				Devices: dev,
+				Devices: sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			switch tt.name {
 			case "GetFlow_with_DeviceID_and_cookie":
 				got, err := v.GetFlow(tt.args.deviceId, tt.args.cookie)
@@ -654,8 +694,8 @@
 		ctx: context.Background(),
 		ID:  "SDX6320031",
 	}
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	tests := []struct {
 		name string
 		args args
@@ -679,8 +719,12 @@
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
-				Devices: dev,
+				Devices: sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			switch tt.name {
 			case "GetTaskList":
 				if got := v.GetTaskList(tt.args.device); !reflect.DeepEqual(got, tt.want) {
@@ -710,8 +754,8 @@
 		ID:          "SDX6320031",
 		PortsByName: portsByName,
 	}
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	tests := []struct {
 		name    string
 		args    args
@@ -739,8 +783,12 @@
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
-				Devices: dev,
+				Devices: sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			switch tt.name {
 			case "GetPortState":
 				got, err := v.GetPortState(tt.args.device, tt.args.name)
@@ -787,8 +835,8 @@
 		PortsByName: portsByName,
 		meters:      devMtr,
 	}
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	tests := []struct {
 		name    string
 		args    args
@@ -825,8 +873,12 @@
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
-				Devices: dev,
+				Devices: sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			switch tt.name {
 			case "ModMeter":
 				if err := v.ModMeter(tt.args.port, tt.args.device, tt.args.command, tt.args.meter); (err != nil) != tt.wantErr {
@@ -951,8 +1003,8 @@
 		ctx: context.Background(),
 		ID:  "SDX6320031",
 	}
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	tests := []struct {
 		name string
 		args args
@@ -977,8 +1029,12 @@
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
 				rebootInProgressDevices: rebootInProgressDevices,
-				Devices:                 dev,
+				Devices:                 sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			switch tt.name {
 			case "SetRebootInProgressForDevice":
 				if got := v.SetRebootInProgressForDevice(tt.args.device); got != tt.want {
@@ -1003,8 +1059,8 @@
 		ID:  "SDX6320031",
 	}
 	rebootInProgressDevices["SDX6320031"] = "done"
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	tests := []struct {
 		name string
 		args args
@@ -1022,8 +1078,12 @@
 		t.Run(tt.name, func(t *testing.T) {
 			v := &VoltController{
 				rebootInProgressDevices: rebootInProgressDevices,
-				Devices:                 dev,
+				Devices:                 sync.Map{},
 			}
+			dev.Range(func(key, value interface{}) bool {
+				v.Devices.Store(key, value)
+				return true
+			})
 			if got := v.ReSetRebootInProgressForDevice(tt.args.device); got != tt.want {
 				t.Errorf("VoltController.ReSetRebootInProgressForDevice() = %v, want %v", got, tt.want)
 			}
@@ -1151,8 +1211,8 @@
 		groups:      sync.Map{},
 		PortsByName: portsByName,
 	}
-	dev := map[string]*Device{}
-	dev["SDX6320031"] = device
+	var dev sync.Map
+	dev.Store("SDX6320031", device)
 	grp := &of.Group{
 		Device:  "SDX6320031",
 		GroupID: uint32(256),
@@ -1205,8 +1265,12 @@
 			switch tt.name {
 			case "GroupUpdate", "DeviceNOtFound_Error", "PortNOtFound_Error":
 				v := &VoltController{
-					Devices: dev,
+					Devices: sync.Map{},
 				}
+				dev.Range(func(key, value interface{}) bool {
+					v.Devices.Store(key, value)
+					return true
+				})
 				if err := v.GroupUpdate(tt.args.port, tt.args.device, tt.args.group); (err != nil) != tt.wantErr {
 					t.Errorf("VoltController.GroupUpdate() error = %v, wantErr %v", err, tt.wantErr)
 				}
@@ -1216,11 +1280,15 @@
 					groups:      sync.Map{},
 					PortsByName: portsByName,
 				}
-				dev := map[string]*Device{}
-				dev["SDX6320031"] = device
+				var dev sync.Map
+				dev.Store("SDX6320031", device)
 				v := &VoltController{
-					Devices: dev,
+					Devices: sync.Map{},
 				}
+				dev.Range(func(key, value interface{}) bool {
+					v.Devices.Store(key, value)
+					return true
+				})
 				if err := v.GroupUpdate(tt.args.port, tt.args.device, tt.args.group); (err != nil) != tt.wantErr {
 					t.Errorf("VoltController.GroupUpdate() error = %v, wantErr %v", err, tt.wantErr)
 				}
