fixes in calibration, and added wrappers