update index page code