implementing search in the front end