updateState