port of calibration routines