change DFH to DFA