mahalanobis does work, bc the R command returns the squared distance