fixed bracket problem encountered from switching over from apply(x, 1, sd) to rowSds function earlier