modify state machine