changed controller to route pages