moving methods to the Page class