fully functional search bar implementation