add state machine controller