refactoring and read/write pages.