Added self calibration