fixed the search functions!!