Why is a for loop used