added function to compute variance with standard errors