wip: more state transition stuff