added distance calculation between waypoints