minor search refactor