Implement union for StateMachine