enhanced StateMachine mixin