associate state with their stateMachine