add k-nearest-search