changed searchBar method