switch name to state data