fixed nfa to dfa, maybe more bugs