update variable implementation