modify the search function