fixed your loop