refactor dictionary page handling