search functionality working on front end