refactor search methods