No need for the duplicated if and for loop for the MixedNodeStates