added the search functionality