store intermediate values in vars