finish index page
refactor