add state control