public void nextModel(LineageState state) {
			state.setCurrentTime(getNextEventTime());
			double time = getNextEventTime();

			if (time == Long.MAX_VALUE) {
				// assert false:state.getLinagesActive();
				throw new RuntimeException("Model does not permit full coalescent of linages.\n Check for zero migration rates or for exp population growth pastward");
			}
			// we have severl posible states.
			// -1 we have important events at time zero.... ie newSamples
			// 1 the current event is before the model end.. we increment events but not a model
			// 2 the current events == the the model end. we increment events and the model
			// 3 the current events are after the model. We just incremet the model

			// this covers the 2 cases where the events need to be increment
			// System.out.println("PreCurrentEventLoop:"+currentEvent);
			while (currentEvent != null && currentEvent.getEventTime() == time) {
				// System.out.println("EventsMoveLoop:"+currentEvent);
				currentEvent.processEventCoalecent(state);
				if (eventIterator.hasNext()) {
					currentEvent = eventIterator.next();
				} else {
					currentEvent = null;
				}
			}
			//
			if ((time >= currentModel.getEndTime() || currentEvent == null) && modelIterator.hasNext() && time > 0) {
				currentModel = modelIterator.next();
			}
			state.setCurrentMaxTime(getNextEventTime());
			state.setSelectionData(currentModel.getSelectionData());
			// System.out.println("SelectionData? "+currentModel.getSelectionData()+"\t"+state.getSelectionData());
		}