two pass knn