refactored index page