Changes to state transition, need more testing