writing main page.