public static Op GOT(Op newOp) {
        int k = 0, j = 0;
        StateVector vecNew = newOp.getStateVec();
        for (k = 0; k < hBuffer.size(); k++) {
            Op opTmp = hBuffer.get(k);
            StateVector vecTmp = opTmp.getStateVec();
            // a, b are independent
            if (!isDependent(vecTmp, vecNew, vecTmp.getId()) && !isDependent(vecNew, vecTmp, vecNew.getId()))
                break;
        }
        if (k == hBuffer.size()) {
            // no independent operation in the buffer
            return newOp;
        }
        // list of operations in HB[k+1...m] which are causally preceding Onew
        List<Op> eol = new ArrayList<Op>();
        // index of these operations
        List<Integer> c = new ArrayList<Integer>();
        for (int i = k + 1; i < hBuffer.size(); i++) {
            Op opTmp = hBuffer.get(i);
            StateVector vecTmp = opTmp.getStateVec();
            if (isDependent(vecTmp, vecNew, vecTmp.getId())) {
                eol.add(opTmp);
                c.add(i);
            }
        }
        if (eol.isEmpty()) {
            // all the operations between [k+1...m] are also independent with Onew
            return LIT(newOp, hBuffer.subList(k, hBuffer.size()));
        }
        List<Op> eolPrime = new ArrayList<Op>();
        for (int i = 0; i < eol.size(); i++) {
            int ci = c.get(i);
            List<Op> his = new ArrayList<Op>(hBuffer.subList(k, ci));
            Collections.reverse(his);
            Op opTmp = LET(eol.get(i), his);
            eolPrime.add(LIT(opTmp, eolPrime));
        }
        Collections.reverse(eolPrime);
        Op onewPrime = LET(newOp, eolPrime);
        return LIT(onewPrime, hBuffer.subList(k, hBuffer.size()));
    }