updated page view function in index page.