modifications to state machine