setStates function

setStates