page info code refactoring