Adding page method to pages class