Changing function of search bar