what happens to an electromagnet when you remove the power supply