Working code for trip creation