Electromagnets are magnets formed when current passes through