fixed the loopiong