This part I'm a  bit skeptical about... for loops are generally preferrable than do/while or while when you have a numeric counter IMHO. Also, another part is a bit confusing - another comment coming up in a second. :)