so that the magnet gets demagnetized when inside the solenoid