Added for loop for outputting text