improved and simpler calibration