committing inside the loop is performance killer