updating the variables