role of magnesium in the body