added search functionality to the front end