add state machine grain