changed cumulative propagation delay and average number of hops to only
count successful connections. Also changed the counters to something
more simpler inside the while loop