splitting up index page
refactoring a little bit