created pages controller for main pages