search function on index page created