putt iterating inside formate function
pulled iterating out of print function