added the exec stuff to the top of write_calibration