@Override
	public StateBuffer execute(StateBuffer in) {
		StateBuffer out = new StateBuffer();
		int sumDelay = -1;
		while(!out.isFull() && (!onlyOneStateNeeded || out.isEmpty())) {
			sumDelay++;
			System.out.println("FindShortestSequenceSegment: testing delay "+sumDelay+" size="+out.size());
			for(State s : in.getStates()) {
			  curGb.restore(s);
				rec(s,0,sumDelay,out);
			}
		}
		return out;
	}