New State Machine and added Ball Sensor