Implemented a DFA