refactoring pages