working automaton