Just a quick advise, please continue if you can. Note that, commit in loop is not recommended, you need to find out the way to commit from out of a loop. A hint is create a list out of the loop then use inside the loop, then commit outside the loop. Your homework ^^