changed 1nn to knn