improve AttentionStateMachine