build up the main page