also this might be better to reuse the trait KernelIndex.