better algorithm for calculating the remaining distance in the current step, display this distance instead of the total distance