added code for the index page