Calibrating function added.