Magnesium and metabolic function