implemented search functionality to search bar