Working on state machines.