instead of closing the whole thing, it is better to clone within the cycle per item. that will be faster.