diff --git a/app.py b/app.py
index 44c91ec..e7ede6a 100644
--- a/app.py
+++ b/app.py
@@ -78,9 +78,10 @@
                       default="3333")
     return parser
 
-def update(roc, prom, devices):
-    roc.update_devices(devices)
-    prom.update_devices(devices)
+def update(roc, prom, old):
+    new = roc.update_devices(old)
+    prom.update_devices(new)
+    return new
 
 def probe(devices):
     for imsi_id, device in devices.items():
@@ -97,11 +98,11 @@
 def work_thread(roc, prom):
     global devices, lock
     while True:
-        temp_devices = {}
-        update(roc, prom, temp_devices)
-        probe(temp_devices)
+        new = update(roc, prom, devices)
+        probe(new)
         with lock:
-            devices = temp_devices
+            devices = new
+
         time.sleep(5)
 
 if __name__ == '__main__':
diff --git a/device.py b/device.py
index 2b1ffcd..963d5ce 100644
--- a/device.py
+++ b/device.py
@@ -8,10 +8,10 @@
 
 
 class Device(object):
-    def __init__(self, imsi_id, imsi, ip=None):
+    def __init__(self, imsi_id, imsi, last_reachable=datetime.min, ip=None):
         # log.debug("creating device, imsi_id={}, imsi={}, ip={}".format(imsi_id, imsi, ip))
         self.imsi_id = imsi_id
         self.imsi = imsi
         self.ip = ip
         self.reachable = False
-        self.last_reachable = datetime.min
+        self.last_reachable = last_reachable
diff --git a/prom.py b/prom.py
index 9a517e1..5c4668c 100644
--- a/prom.py
+++ b/prom.py
@@ -58,11 +58,9 @@
             metric = elem['metric']
             if 'imsi' in metric and 'mobile_ip' in metric:
                 imsi = metric['imsi']
-                if imsi in devices:
-                    # log.info("{} added to list of monitored devices".format(imsi))
-                    devices[imsi].ip = metric['mobile_ip']
-                else:
-                    log.error("Ignoring device as it was not reported by ROC - {}".format(metric))
+                for k in devices:
+                    if devices[k].imsi == imsi:
+                        devices[k].ip = metric['mobile_ip']
             else:
                 log.error("Ignoring device as imsi or mobile-ip not found - {}".format(metric))
 
diff --git a/roc.py b/roc.py
index fe328aa..be609bf 100644
--- a/roc.py
+++ b/roc.py
@@ -9,6 +9,7 @@
 from requests.structures import CaseInsensitiveDict
 import logging as log
 import pyaml
+from datetime import datetime
 
 from device import Device
 
@@ -120,10 +121,17 @@
         return devices
 
     def update_devices(self, devices):
+        new = {}
         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'])
+                imsi_id = str(d['imsi-id'])
+                imsi = str(d['imsi-range-from'])
+                last_reachable = datetime.min
+                if imsi_id in devices:
+                    last_reachable = devices[imsi_id].last_reachable
+                new[imsi_id] = Device(imsi_id, imsi, last_reachable)
+        return new
 
     def get_subnet(self):
         subnets = {}
