i = i + 1 --  any for loop that double-increments like this could probably be rewritten to avoid this.  the logic in this loop is difficult to follow as to its purpose.