no init for tests
make index functions more generic