practice with finite state machines.