refactoring index page to use just render, to ch 9.4