fixed some small typos in last commit. Also, sqr(m.c) is in numerator, not denominator