update variable references