What is the loop for and did you inc %i inside the loop?