main is a for loop