move out the search functions