refactoring page pipe