create page logic