better mag int cal
moved to utils