Inclusion Criteria:  Age between 21-80 inclusive HbA1c>9% on insulin Requiring inpatient adjustment of DM medication if meets any of the following: A) Hypoglycemia (defined as glucose < 4 mmol/l occurring 2 or more times at least 3 hours apart in the last 72 hours or any glucose <2.5 mmol/l in the last 24 hours) B) Hyperglycemia (defined as glucose > 14 mmol/l occurring 2 or more times in the last 36 hours, or any glucose > 24 mmol/l in the last 24 hours) Desire to lower HbA1c to a target of 7% Willing to wear FGM device Willing and able to use FreeStyle Librelink app on personal device Willing to avoid use of ascorbic acid throughout the study Willing to perform SMBG (by history) of an average of at least 4 times a day, 3 days a week  Exclusion Criteria:  T1DM Pregnant or planning pregnancy during duration of study Unable to use or unwilling to comply with study requirements Use of personal FGM within 3 months of screening or plan to use personal FGM during the course of the study On ascorbic acid Extensive skin changes that preclude wearing the sensor on normal skin (e.g. extensive psoriasis, extensive eczema, recent burns or severe sunburn, extensive tattoos, dermatitis herpetiformis) Known allergy to medical-grade adhesives Renal insufficiency (eGFR<30) Pancreatic insufficiency or history of pancreatitis Patients on any structured weight reduction interventions such as prescription weight loss medications, bariatric surgery, or protein sparing modified fast during the course of the study. Current or anticipated short term uses of glucocorticoids (oral, injectable, or intravenous. Long-term stable glucocorticoid doses are allowed, such as for treatment of rheumatoid arthritis or Addison's disease. Any medical condition that would make it inappropriate to target an HbA1c of <7% Currently abusing illicit drugs, alcohol or prescription drugs Any condition per investigator assessment, that could impact reliability of the HbA1c measurement, such as but not limited to hemoglobinopathy, haemolytic anaemia, chronic liver disease, chronic GI blood loss, recent red blood cell transfusion or erythropoietin administration within 3 months prior to screening Current participation in another investigational study (must have completed any prior studies at least 30 days prior to being enrolled in this study)