refactoring; added gotoPage and getPageSize methods