This is too far from the loop to be using a variable with a generic name like i.  Rename it insertionPosition or something.