Added method for calculating trip duration