refine search functions