reoganize search functions