refactor of page layout