use let to increment $i