updated ita_looping to avoid possible infinite loop.