subscribe: add state machine