diff --git a/roc.py b/roc.py
index 9d9478f..ede71f7 100644
--- a/roc.py
+++ b/roc.py
@@ -5,10 +5,13 @@
 
 import requests
 import json
+# noinspection PyUnresolvedReferences
 from requests.structures import CaseInsensitiveDict
 import logging as log
 import pyaml
 
+from device import Device
+
 URL = "https://roc.menlo.aetherproject.org/aether-roc-api/aether/v4.0.0/connectivity-service-v4/"
 
 
@@ -51,6 +54,7 @@
             if response.status_code != 201:
                 log.error("Failed to set mbr, device_group:{}, mbr:{}, status_code: {}".format(device_group, mbr,
                                                                                                response.status_code))
+                # noinspection PyUnresolvedReferences
                 sys.exit()
 
     def get_key(self):
@@ -92,11 +96,11 @@
             return None
         return json.loads(response.text)
 
-    def get_devicegroup(self):
+    def get_devicegroups(self):
         url = URL + "device-group"
         response = requests.get(url, headers=self.headers())
         if response.status_code != 200:
-            log.error("get_devicegroup() failed, status_code: {}".format(response.status_code))
+            log.error("get_devicegroups() failed, status_code: {}".format(response.status_code))
             return None
         return json.loads(response.text)['device-group']
 
@@ -108,14 +112,20 @@
             return None
         return json.loads(response.text)['ip-domain']
 
-    def get_imsi(self):
-        imsis = {} # imsi-id:imsi
-        devicegroups = self.get_devicegroup()
+    def get_devices(self):
+        imsis = {}
+        devicegroups = self.get_devicegroups()
         for devicegroup in devicegroups:
-            for imsi in devicegroup['imsis']:
-                imsis[imsi['imsi-id']] = imsi['imsi-range-from']
+            for device in devicegroup['imsis']:
+                imsis[device['imsi-id']] = device['imsi-range-from']
         return imsis
 
+    def update_devices(self, devices):
+        dgs = self.get_devicegroups()
+        for dg in dgs:
+            for d in dg['imsis']:
+                devices[str(d['imsi-range-from'])] = Device(str(d['imsi-id']), d['imsi-range-from'])
+
     def get_subnet(self):
         subnets = {}
         ip_domains = self.get_ipdomain()
@@ -128,7 +138,7 @@
         print(pyaml.dump(self.get_enterprise()))
         print(pyaml.dump(self.get_site()))
         print(pyaml.dump(self.get_upf()))
-        print(pyaml.dump(self.get_devicegroup()))
+        print(pyaml.dump(self.get_devicegroups()))
         print(pyaml.dump(self.get_ipdomain()))
 
 
@@ -140,7 +150,7 @@
     print(pyaml.dump(roc.get_enterprise()))
     print(pyaml.dump(roc.get_site()))
     print(pyaml.dump(roc.get_upf()))
-    print(pyaml.dump(roc.get_devicegroup()))
+    print(pyaml.dump(roc.get_devicegroups()))
     print(pyaml.dump(roc.get_ipdomain()))
 
     cameras = "menlo-4g-cameras"
