LOForEach foreach = new LOForEach(load.getPlan());
// add foreach to the base plan
p.add(foreach);
Pair<Integer,Integer> disconnectedPos = p.disconnect(load, next);
p.connect(load, disconnectedPos.first.intValue(), foreach, 0 );
p.connect(foreach, 0, next, disconnectedPos.second.intValue());
// add foreach to the subplan
subPlan.add(foreach);