begin search functionality