cannot compile, and only for temp recording. Now have problem about how to reference template class type in template
use our custom KeyValuePair templates instead of std::pair to store index