why is wire used in an electromagnet coiled??