Update Variable function.