added dfa class and test file for it
added dfa class and test file for it