implement magnetization calculation; untested