page generation should be last