exchange for loops for util.each()