kNNClassifier modified