added functionality to index page