call isFriends in TripService class, restructure the code