made it print from a for loop