properly cast to index_t