updated index page to template form