implemented the search feature