random data generator
print total distance in test program