fix for loop to times