running the controller for the state
Running controller on state change