added new function to the controller for new pages