change the class so that it represents an equivalent deterministic finite automaton called DFA
