added tests for CalcIndex()
sneaky little bracket go bye bye