refactored calibration

Change-Id: I3be553e8f2bd6ad36d0c5355f9704cfde891be88