half way thru refactoring pagestate class