initial commit
changed while loops to for loops
.