automata this time for real (I hope)