Modify state machine