added page view logic