For loop replaces iterator