magnetic memory method