updates variables 1-7