making the accel calib function more like the working test program