using the for loop