KNN-extension functionality added