fixed print line to not include final loop counter