diff --git a/README.md b/README.md
index e8095d4..3ebfa16 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,6 @@
 # Network Diagnostics Application for Aether Edge
 
-## TBD
+python3 networkdiag.py --user=xxx --password=yyy
+
+curl http://localhost:3333/subnet
+curl http://localhost:3333/imsi
diff --git a/networkdiag.py b/networkdiag.py
index 7529eae..cb8bedb 100644
--- a/networkdiag.py
+++ b/networkdiag.py
@@ -7,25 +7,58 @@
 from flask import Flask, request
 from flask_restful import Resource, Api
 import logging as log
+from argparse import ArgumentParser, SUPPRESS
+
+from roc import Roc
 
 app = Flask(__name__)
 api = Api(app)
 
+global roc
 
-class Greeting(Resource):
+
+class Imsi(Resource):
     def get(self):
-        return 'Hello World!'
+        return roc.get_imsi()
+
+class Subnet(Resource):
+    def get(self):
+        return roc.get_subnet()
 
 
-api.add_resource(Greeting, '/')  # Route_1
+api.add_resource(Imsi, '/imsi')
+api.add_resource(Subnet, '/subnet')
+
+
+def build_argparser():
+    parser = ArgumentParser(add_help=False)
+    args = parser.add_argument_group('Options')
+    args.add_argument('-h', '--help',
+                      action='help',
+                      default=SUPPRESS,
+                      help='Show this help message and exit.')
+    args.add_argument("--user",
+                      help="ROC username",
+                      type=str)
+    args.add_argument("--password",
+                      help="ROC password",
+                      type=str)
+    return parser
+
 
 if __name__ == '__main__':
     log.basicConfig(
-            format='%(asctime)s %(levelname)-8s %(message)s',
-            level=log.DEBUG,
-            datefmt='%Y-%m-%d %H:%M:%S',
-            stream=sys.stdout)
+        format='%(asctime)s %(levelname)-8s %(message)s',
+        level=log.DEBUG,
+        datefmt='%Y-%m-%d %H:%M:%S',
+        stream=sys.stdout)
 
     log.info("Starting network-diag-app...")
 
+    args = build_argparser().parse_args()
+
+    roc = Roc(args.user, args.password)
+    #roc.dump()
+    print(roc.get_imsi())
+
     app.run('0.0.0.0', '3333')
diff --git a/roc.py b/roc.py
index fd45701..9d9478f 100644
--- a/roc.py
+++ b/roc.py
@@ -98,7 +98,7 @@
         if response.status_code != 200:
             log.error("get_devicegroup() failed, status_code: {}".format(response.status_code))
             return None
-        return json.loads(response.text)
+        return json.loads(response.text)['device-group']
 
     def get_ipdomain(self):
         url = URL + "ip-domain"
@@ -106,7 +106,31 @@
         if response.status_code != 200:
             log.error("get_ipdomain() failed, status_code: {}".format(response.status_code))
             return None
-        return json.loads(response.text)
+        return json.loads(response.text)['ip-domain']
+
+    def get_imsi(self):
+        imsis = {} # imsi-id:imsi
+        devicegroups = self.get_devicegroup()
+        for devicegroup in devicegroups:
+            for imsi in devicegroup['imsis']:
+                imsis[imsi['imsi-id']] = imsi['imsi-range-from']
+        return imsis
+
+    def get_subnet(self):
+        subnets = {}
+        ip_domains = self.get_ipdomain()
+        for ip_domain in ip_domains:
+            subnets[ip_domain['id']] = ip_domain['subnet']
+        return subnets
+
+
+    def dump(self):
+        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_ipdomain()))
+
 
 
 if __name__ == '__main__':
