use KernelIndex instead of vector