Now updates the state.