[#9] changed for to each