Implemented TCP search algorithm