add knn cop support(not finished yet)