added automaton and state