added page logic