fixed the style of iteration