fixing the search script