more state dumbness
scripted update of code from master at c7ec81a more state dumbness