update value when changing a number in the code