added date initialization to renderPage