I'm looking to do the same thing but avoid the loop. Your code works fine, it just took 3 minutes to finish.