updated trip.c