changes to variance estimation function in MCMC