switched to state