Working a finite-state machine