added pages controller and header and footer