refactoring
implemented logic to find trips with a max of 3 hops and a new test case to verify