version 2.0: classic knn