then find the total distance travelled