added reset for loops