Why not just use an indexed for loop?