removed double tab in measure_average_distance