add simplify method for DFA