added test for LoopIndex