debugged+OO version of State tried, but uses more SRAM