refactor search functions