update vars method