implemented knn