Trying to debug and stuck
still stuck, switched to ensuring the index.
still stuck, added an assertion to check for correct indices