Inclusion Criteria:  Experimental Group:  - Be scheduled for and receive a liver transplant or total pancreatectomy and islet cell autotransplantation  Control Group:  - Received a liver transplant or total pancreatectomy and islet cell autotransplantation.  Exclusion Criteria:  Experimental Group:  Pregnant or unwilling to abstain from sex if not practicing birth control during participation in the study. Presence of a condition or abnormality that in the opinion of the Investigator would compromise the safety of the patient or the quality of the data. Known allergic reactions to components of the MgSO4 History of heart block or myasthenia graves in past medical history. Presence of cardiac pacemaker Any patient with preoperative creatinine level > 1.5x upper limit of normal.  Control Group:  Any patient who had filed as research-exempt (opt-out of research previously). Any patient with preoperative creatinine level > 1.5x upper limit of normal.