example work state machine