Search algorithm implemented.