made search button function