Fix knn to use new stuff