changed to work with search bar