beginning of alternative standard errors function