Yea it seems like your running through all of that code more than once because of code outside of the loop. Maybe you should try putting a marker like a print statement at the top of all that code in...