updates to state machine