         // function to get North along the accel +x-axis, East along the accel -y-axis, and Down along the accel -z-axis.
         // This orientation choice can be modified to allow any convenient (non-NED) orientation convention.
         // Pass gyro rate as rad/sx
-        MadgwickQuaternionUpdate(q, d, IMU.delta);
+        //MadgwickQuaternionUpdate(q, d, IMU.delta);
 
         // print the data
+        if (count > 0) 
         if (mode == MODE_IMU || mode == MODE_RUN || mode == MODE_COUNTDOWN || mode == MODE_RUNOFF)
         {
-            printData(time);
+            cli();
+            int c = count;
+            for (int i = 0; i < 10; i++)
+               d2[i] = d[i];
+            count = 0;
+            sei();
+            printData(time, d2, c);
         }
     }
 }
 
-void printData(unsigned long time)
-{
+void printData(unsigned long time, const float* data, const int cnt)
+{   /*
     float roll;
     float pitch;
     float yaw;
 
-    toEulerianAngle(q, roll, pitch, yaw);
+    toEulerianAngle(q, roll, pitch, yaw);*/
 
-    info(time, "IMU a %f %f %f g %f %f %f m %f %f %f q %f %f %f %f roll %f pitch %f yaw %f d %f\n",
-        d[0], d[1], d[2], // accel
-        d[3], d[4], d[5], // gyro
-        d[6], d[7], d[8], // magnetometer
-        q[0], q[1], q[2], q[3], // quaternion
-        roll, pitch, yaw,
-        IMU.delta);
+//    info(time, "IMU a %f %f %f g %f %f %f m %f %f %f q %f %f %f %f roll %f pitch %f yaw %f d %f\n",
+    info(time, "IMU a %f %f %f g %f %f %f m %f %f %f c %i\n",
+        data[0], data[1], data[2], // accel
+        data[3], data[4], data[5], // gyro
+        data[6], data[7], data[8], // magnetometer
+        //q[0], q[1], q[2], q[3], // quaternion
+        //roll, pitch, yaw,
+        //IMU.delta
+        cnt
+        );
 }

    eepromRW(EEPROM_IMU_INTERVAL, IMU_INTERVAL, imuInterval, action, time);
}

void imuLoop(unsigned long time, int mode)
{
    static unsigned long next;

    // is it this time to read IMU
    if (next < time)
    {
        // set up next ping time
        next = time + imuInterval;

        // get the accel (m/s/s), gyro (rad/s), and magnetometer (uT), and temperature (C) data
        IMU.getMotion10Unbiased(d);

        // Sensors x (y)-axis of the accelerometer/gyro is aligned with the y (x)-axis of the magnetometer;
        // the magnetometer z-axis (+ down) is misaligned with z-axis (+ up) of accelerometer and gyro!

    };

    IMU.setBias(b);

    status = IMU.setFilter(DLPF_BANDWIDTH_184HZ, 9);
    if (status < 0) 
    {
        setupFail("IMU INT unsuccessful");
    }
    pinMode(IMU_INT_PIN, INPUT);
    attachInterrupt(IMU_INT_PIN, getIMU, RISING);    
}

void imuEeprom(int action, const unsigned long time)
