refactoring page layout