added calibration functionality