pages factory defined as a service