diff --git a/TestON/tests/TopoConvNext/TopoConvNext.py b/TestON/tests/TopoConvNext/TopoConvNext.py
index 52a951c..68d7b5d 100644
--- a/TestON/tests/TopoConvNext/TopoConvNext.py
+++ b/TestON/tests/TopoConvNext/TopoConvNext.py
@@ -185,6 +185,8 @@
             num_sw = main.params['TEST']['numSwitch2']
         elif topo_iteration == 3:
             num_sw = main.params['TEST']['numSwitch3']
+        elif topo_iteration == 4:
+            num_sw = main.params['TEST']['numSwitch4']
         #***********
 
         #Timestamp 'keys' for json metrics output.
@@ -323,7 +325,7 @@
             #NOTE:
             #       Delay before checking devices to 
             #       help prevent timing out from CLI
-            #       due to multiple command drop
+            #       due to multiple command issuing 
             time.sleep(20)
 
             loop = True
@@ -338,6 +340,9 @@
                 device_json1 = json.loads(device_str1)
                 json_len = len(device_json1) 
                 
+                #NOTE: May want to check the rest of 
+                #      the ONOS instances for device down as well
+
                 for device1 in device_json1: 
                     temp_len = temp_len + 1
                     if device1['available'] == True:
@@ -361,73 +366,10 @@
                     
                         loop = False
                         break
-
-                #if cluster_count == 1:
-                #    device_str1 = main.ONOS1cli.devices(
-                #        node_ip=ONOS_ip_list[1])
-                #    device_json1 = json.loads(device_str1)
-                #    for device1 in device_json1:
-                #        if device1['available'] == False:
-                #            device_count += 1
-                #        else:
-                #            device_count = 0
-                #if cluster_count == 2:
-                #    device_str2 = main.ONOS2cli.devices(
-                #        node_ip=ONOS_ip_list[2])
-                #    device_json2 = json.loads(device_str2)
-                #    for device2 in device_json2:
-                #        if device2['available'] == False:
-                #            device_count += 1
-                #        else:
-                #            device_count = 0
-                #if cluster_count == 3:
-                #    device_str3 = main.ONOS3cli.devices(
-                #        node_ip=ONOS_ip_list[3])
-                #    device_json3 = json.loads(device_str3)
-                #    for device3 in device_json3:
-                #        if device3['available'] == False:
-                #            device_count += 1
-                #        else:
-                #            device_count = 0
-                #if cluster_count == 4:
-                #    device_str4 = main.ONOS4cli.devices(
-                #        node_ip=ONOS_ip_list[4])
-                #    device_json4 = json.loads(device_str4)
-                #    for device4 in device_json4:
-                #        if device4['available'] == False:
-                #            device_count += 1
-                #        else:
-                #            device_count = 0
-                #if cluster_count == 5:
-                #    device_str5 = main.ONOS5cli.devices(
-                #        node_ip=ONOS_ip_list[5])
-                #    device_json5 = json.loads(device_str5)
-                #    for device5 in device_json5:
-                #        if device5['available'] == False:
-                #            device_count += 1
-                #        else:
-                #            device_count = 0
-                #if cluster_count == 7:
-                #    device_str7 = main.ONOS7cli.devices(
-                #        node_ip=ONOS_ip_list[7])
-                #    device_json7 = json.loads(device_str7)
-                #    for device7 in device_json7:
-                #        if device7['available'] == False:
-                #            device_count += 1
-                #        else:
-                #            device_count = 0
-   
-                #If device count is greater than the 
-                #number of switches discovered by all nodes
-                #then remove iptables and measure t0 system time
-                    
                 
                 loop_count += 1
                 time.sleep(1)
 
-            if device_count < int(num_sw):
-                main.log.info("Devices down did not ")
-
             main.log.info("System time t0: "+str(t0_system))
 
             counter_loop = 0
@@ -590,7 +532,7 @@
                         else:
                             main.log.info("Switch discovery latency "+
                                 "exceeded the threshold.")
-                            main.log.info(graph_lat_1)
+                            main.log.info(str(graph_lat_1)+" ms")
                         #Break while loop 
                         break
                 if cluster_count == 2:
@@ -635,7 +577,7 @@
                         else:
                             main.log.info("Switch discovery latency "+
                                 "exceeded the threshold.")
-                            main.log.info(max_graph_lat)
+                            main.log.info(str(max_graph_lat)+" ms")
                         break
                 if cluster_count == 3:
                     if onos1_dev and onos2_dev and onos3_dev:
@@ -693,7 +635,7 @@
                         else:
                             main.log.info("Switch discovery latency "+
                                 "exceeded the threshold.")
-                            main.log.info(max_graph_lat)
+                            main.log.info(str(max_graph_lat)+" ms")
                         
                         break
                 if cluster_count == 4:
@@ -756,7 +698,7 @@
                         else:
                             main.log.info("Switch discovery latency "+
                                 "exceeded the threshold.")
-                            main.log.info(max_graph_lat)
+                            main.log.info(str(max_graph_lat)+" ms")
                 
                         break
                 if cluster_count == 5:
@@ -835,7 +777,7 @@
                         else:
                             main.log.info("Switch discovery latency "+
                                 "exceeded the threshold.")
-                            main.log.info(max_graph_lat)
+                            main.log.info(str(max_graph_lat)+" ms")
                 
                         break
                 if cluster_count == 6:
@@ -918,7 +860,7 @@
                         else:
                             main.log.info("Switch discovery latency "+
                                 "exceeded the threshold.")
-                            main.log.info(max_graph_lat)
+                            main.log.info(str(max_graph_lat)+" ms")
                         
                         break
                 if cluster_count == 7:
@@ -1018,7 +960,7 @@
                         else:
                             main.log.info("Switch discovery latency "+
                                 "exceeded the threshold.")
-                            main.log.info(max_graph_lat)
+                            main.log.info(str(max_graph_lat)+" ms")
                         
                         break
                 
@@ -1153,7 +1095,9 @@
             sw_lat_avg = sum(sw_discovery_lat_list) / \
                      len(sw_discovery_lat_list)
             sw_lat_dev = numpy.std(sw_discovery_lat_list)
-        else: 
+        else:
+            sw_lat_avg = 0
+            sw_lat_dev = 0
             assertion = main.FALSE
         
         main.log.report("Switch connection attempt time avg "+
@@ -1329,3 +1273,6 @@
         utilities.assert_equals(expect=main.TRUE, actual=assertion,
             onpass="Topology size increased successfully",
             onfail="Topology size was not increased")
+
+
+
