mahalanobis working