initial code for calibration