private final int getNextPlan(int i) {
		if (plans.length > i + 1) {
			if (plans[i + 1] == null) {
				return getNextPlan(i + 1);
			}
			return i + 1;
		} else {
			if (isLoop())
				return getNextPlan(-1);
			else 
				return -1;
		}
	}