beginning search functionality