added method to Calculate trip time