added automatic zero calibration feature