   accel.getEvent(&accel_event);
   if (dof.accelGetOrientation(&accel_event, &orientation))
   {
-    sdWrite((String)accel_event.acceleration.x);
-    sdWrite((String)accel_event.acceleration.y);
-    sdWrite((String)accel_event.acceleration.z);
-    sdWrite((String)accel_event.orientation.roll);
-    sdWrite((String)accel_event.orientation.pitch);
-    sdWrite((String) accel_event.orientation.heading);
-    sdWriteNewline();
+    dataString = ((String) accel_event.acceleration.x) + ((String)accel_event.acceleration.y) + ((String)accel_event.acceleration.z)
+      + ((String)accel_event.orientation.roll) + ((String)accel_event.orientation.pitch) + ((String) accel_event.orientation.heading) + millis() + '\n';
+    sdWrite(dataString);
   }
 }
 bool sdWriteNewline() {

  // if the file is available, write to it:
  if (dataFile) {
    dataFile.print(data);
    dataFile.print(", ");i
    dataFile.close();
    // print to the serial port too:
  }

sensors_event_t accel_event;
sensors_vec_t   orientation;
//data buffer for the accel and orientation readings
//char dataArray[80];
String dataString;

void initAccel()
{
