Make looping possible with better counters