initial page controller and defined constructor function