added trip_matcher unit test, some performance improvements