"at position i" should be "up to position i"