Replaced for loop with .times iterator