int counter = 0;
for (final UntilStep untilStep : TraversalHelper.getStepsOfClass(UntilStep.class, traversal)) {
final IdentityStep leftEndStep = new IdentityStep(traversal);
leftEndStep.setLabel(UNTIL_PREFIX + counter++);
TraversalHelper.insertBeforeStep(leftEndStep, untilStep, traversal);
final Step rightEndStep = TraversalHelper.getStep(untilStep.getBreakLabel(), traversal);
final String rightEndLabel = rightEndStep.getLabel();
final JumpStep leftEndJumpStep = untilStep.createLeftJumpStep(traversal, rightEndLabel);
leftEndJumpStep.setLabel(untilStep.getLabel());
leftEndJumpStep.doWhile = false;
TraversalHelper.removeStep(untilStep, traversal);
TraversalHelper.insertAfterStep(leftEndJumpStep, leftEndStep, traversal);
final JumpStep rightEndJumpStep = untilStep.createRightJumpStep(traversal, leftEndStep.getLabel());
//new JumpStep(traversal, leftEndStep.getLabel());
rightEndJumpStep.setLabel(rightEndLabel);
rightEndStep.setLabel(Graph.System.system(UUID.randomUUID().toString()));
TraversalHelper.insertAfterStep(rightEndJumpStep, rightEndStep, traversal);
}
}