Electromagnets are used in: