public void stopStatisticsLogging() {
		if (buffer != null) {
			try {
				// write the footer
				buffer.write("\ntime," +
						"distanceLH," +
						"distanceLE," +
						"distanceRH," +
						"distanceRE," +
						"maxAngleLeftLowerArm," +
						"maxAngleLeftUpperArm," +
						"maxAngleRightLowerArm," +
						"maxAngleRightUpperArm\n");
				buffer.write(""+seconds+","+
						distanceLeftHand+","+
						distanceLeftElbow+","+
						distanceRightHand+","+
						distanceRightElbow+","+
						PApplet.degrees(maxAngleLeftLowerArm)+","+
						PApplet.degrees(maxAngleLeftUpperArm)+","+
						PApplet.degrees(maxAngleRightLowerArm)+","+
						PApplet.degrees(maxAngleRightUpperArm));
			} catch (Exception e) {
				PApplet.println("couldn't write to file, buffer exception");
			}
		}
	}