Refactor into single search method