Added code to calculate mileage