the framework for knn down