correct function of distanceForTravel