update to state