Added state transisitons for the controller