added utilities for z calibration