testing $index reference as culprit