finishing changes to KNN and TestKNN