Duplicated location functionality in trip.java