update value at the same time