modified DFA and NFA classes