private Set transitionFunction(String word, Set currentStates) {
		Set tmpSet = new Set(currentStates);
		if (word.length() == 1) {
			for (State state : currentStates) {
				tmpSet.addAll(state.transition(word));
				tmpSet.remove(state);
			}
			Iterator<State> it = tmpSet.iterator();
			while (it.hasNext())
				tmpSet.addAll(eClose(it.next()));
			return tmpSet;
		} else {
			for (State state : currentStates) {
				tmpSet.addAll(state.transition(String.valueOf(word.charAt(0))));
				tmpSet.remove(state);
			}
			Iterator<State> it = tmpSet.iterator();
			while (it.hasNext())
				tmpSet.addAll(eClose(it.next()));
			word = word.substring(1);
			tmpSet = (transitionFunction(word, tmpSet));
			return tmpSet;
		}
	}