add dfa model, but the test need to be fixed