using electromagnet