restructuring the BasePage class