added a for loop