added minkowski distance generalization