friendly state machine