updated array that was being iterated