added automaton functions