fix trip_duration method