Switch to a for loop