Begin calibration code