update the search method