  }
                }

                if (qi < quanta.length - 1) {
                    var q2 = quanta[qi + 1];
                    if (q2.reach > q.reach) {
                        q.reach = q2.reach;
                        changed = true;
                    }
                }

                if (changed) {
                    changeCount++;
                    for (var j = 0; j < q.which; j++) {
                        var q2 = quanta[j];
                        if (q2.reach < q.reach) {
           