adding save/load calibration rule from file. merge with Edwin's changes :D