Improving get_shape_dist_traveled()