implemented function search bar