update variables when you need to