Keeping track of this `i` looks difficult.