Added state switch