added search method and index page