edits to calibration.cpp