Update Calibration Function

Not yet ready but working