initial code for index page