code for loading trip data