Doing each update in a transaction