@Override
	public StateBuffer execute(StateBuffer in) {
		StateBuffer curBuffer = new StateBuffer();
		for(State s : in.getStates())
			skipToStart(curBuffer, s);

		StateBuffer goalBuffer = new StateBuffer();

//		boolean first = true;

		TreeMap<Integer, StateBuffer> next = new TreeMap<Integer, StateBuffer>();
		if (curBuffer.size() > 0)
		  next.put(0, curBuffer);

		while(!next.isEmpty()) {
		  Integer fewestSkips = next.firstKey();
      curBuffer = next.get(fewestSkips);
//      System.out.println("EflTextSegment2: fewestSkips="+fewestSkips+" curBuffer="+curBuffer.size()+" goalBuffer="+goalBuffer.size());
		  next.remove(fewestSkips);

			for(State s : curBuffer.getStates())
				progress(s, fewestSkips, next, goalBuffer);
//			first = false;
		}

		return goalBuffer;
	}