public void update (int _frameCount, float _frameRate) {
		if (lastFrameCount != -9999) {
			seconds += (_frameCount-lastFrameCount)/_frameRate;
		}
		lastFrameCount = _frameCount;
		if (skeleton != null) {
			// copy joint information to new pvector to store in history
			PVector tempLeftHand = new PVector();
			tempLeftHand.set(skeleton.getJointUnmirrored(Skeleton.LEFT_HAND));
			PVector tempLeftElbow = new PVector();
			tempLeftElbow.set(skeleton.getJointUnmirrored(Skeleton.LEFT_ELBOW));
			PVector tempRightHand = new PVector();
			tempRightHand.set(skeleton.getJointUnmirrored(Skeleton.RIGHT_HAND));
			PVector tempRightElbow = new PVector();
			tempRightElbow.set(skeleton.getJointUnmirrored(Skeleton.RIGHT_ELBOW));
			
			// calculation of constant movement indicators
			if (historyLeftHand.size() > 0) {
				PVector lastDirectionOfMovementLeftHand = directionOfMovementLeftHand;
				PVector lastDirectionOfMovementLeftElbow = directionOfMovementLeftElbow;
				PVector lastDirectionOfMovementRightHand = directionOfMovementRightHand;
				PVector lastDirectionOfMovementRightElbow = directionOfMovementRightElbow;
				directionOfMovementLeftHand = PVector.sub(tempLeftHand,historyLeftHand.get(historyLeftHand.size()-1));
				directionOfMovementLeftElbow = PVector.sub(tempLeftElbow,historyLeftElbow.get(historyLeftElbow.size()-1));
				directionOfMovementRightHand = PVector.sub(tempRightHand,historyRightHand.get(historyRightHand.size()-1));
				directionOfMovementRightElbow = PVector.sub(tempRightElbow,historyRightElbow.get(historyRightElbow.size()-1));
				if (PVector.angleBetween(directionOfMovementLeftHand,lastDirectionOfMovementLeftHand) < PConstants.HALF_PI) counterConstantMovementLeftHand++;
				else counterConstantMovementLeftHand = 0;
				if (PVector.angleBetween(directionOfMovementLeftElbow,lastDirectionOfMovementLeftElbow) < PConstants.HALF_PI) counterConstantMovementLeftElbow++;
				else counterConstantMovementLeftElbow = 0;
				if (PVector.angleBetween(directionOfMovementRightHand,lastDirectionOfMovementRightHand) < PConstants.HALF_PI) counterConstantMovementRightHand++;
				else counterConstantMovementRightHand = 0;
				if (PVector.angleBetween(directionOfMovementRightElbow,lastDirectionOfMovementRightElbow) < PConstants.HALF_PI) counterConstantMovementRightElbow++;
				else counterConstantMovementRightElbow = 0;
			}

			// store hand and elbow points to draw history
			historyLeftHand.add(tempLeftHand);
			historyLeftElbow.add(tempLeftElbow);
			historyRightHand.add(tempRightHand);
			historyRightElbow.add(tempRightElbow);

			// accumulation of distance of joints 
			distanceLeftHand += skeleton.getJointDeltaUnmirrored(Skeleton.LEFT_HAND);
			distanceLeftElbow += skeleton.getJointDeltaUnmirrored(Skeleton.LEFT_ELBOW);
			distanceRightHand += skeleton.getJointDeltaUnmirrored(Skeleton.RIGHT_HAND);
			distanceRightElbow += skeleton.getJointDeltaUnmirrored(Skeleton.RIGHT_ELBOW);
			
			// calculation of velocity of joints in mm/second
			velocityLeftHand = skeleton.getJointDeltaUnmirrored(Skeleton.LEFT_HAND)*_frameRate;
			velocityLeftElbow = skeleton.getJointDeltaUnmirrored(Skeleton.LEFT_ELBOW)*_frameRate;
			velocityRightHand = skeleton.getJointDeltaUnmirrored(Skeleton.RIGHT_HAND)*_frameRate;
			velocityRightElbow = skeleton.getJointDeltaUnmirrored(Skeleton.RIGHT_ELBOW)*_frameRate;
			
			// calculation of max angles
			angleLeftLowerArm = skeleton.getAngleLeftLowerArmUnmirrored();
			angleLeftUpperArm = skeleton.getAngleLeftUpperArmUnmirrored();
			angleRightLowerArm = skeleton.getAngleRightLowerArmUnmirrored();
			angleRightUpperArm = skeleton.getAngleRightUpperArmUnmirrored();
			if (angleLeftLowerArm > maxAngleLeftLowerArm) maxAngleLeftLowerArm = angleLeftLowerArm;
			if (PConstants.PI-angleLeftUpperArm > maxAngleLeftUpperArm) maxAngleLeftUpperArm = PConstants.PI-angleLeftUpperArm;
			if (angleRightLowerArm > maxAngleRightLowerArm) maxAngleRightLowerArm = angleRightLowerArm;
			if (PConstants.PI-angleRightUpperArm > maxAngleRightUpperArm) maxAngleRightUpperArm = PConstants.PI-angleRightUpperArm;
			
			
			// log information
			if (buffer != null) {
				try {
					buffer.write(""+seconds+","+
								velocityLeftHand+","+
								velocityLeftElbow+","+
								velocityRightHand+","+
								velocityRightElbow+","+
								skeleton.getJointDeltaUnmirrored(Skeleton.LEFT_HAND)+","+
								skeleton.getJointDeltaUnmirrored(Skeleton.LEFT_ELBOW)+","+
								skeleton.getJointDeltaUnmirrored(Skeleton.RIGHT_HAND)+","+
								skeleton.getJointDeltaUnmirrored(Skeleton.RIGHT_ELBOW)+","+
								skeleton.getJointLCSUnmirrored(Skeleton.LEFT_HAND).x+","+
								skeleton.getJointLCSUnmirrored(Skeleton.LEFT_HAND).y+","+
								skeleton.getJointLCSUnmirrored(Skeleton.LEFT_HAND).z+","+
								skeleton.getJointLCSUnmirrored(Skeleton.LEFT_ELBOW).x+","+
								skeleton.getJointLCSUnmirrored(Skeleton.LEFT_ELBOW).y+","+
								skeleton.getJointLCSUnmirrored(Skeleton.LEFT_ELBOW).z+","+
								skeleton.getJointLCSUnmirrored(Skeleton.RIGHT_HAND).x+","+
								skeleton.getJointLCSUnmirrored(Skeleton.RIGHT_HAND).y+","+
								skeleton.getJointLCSUnmirrored(Skeleton.RIGHT_HAND).z+","+
								skeleton.getJointLCSUnmirrored(Skeleton.RIGHT_ELBOW).x+","+
								skeleton.getJointLCSUnmirrored(Skeleton.RIGHT_ELBOW).y+","+
								skeleton.getJointLCSUnmirrored(Skeleton.RIGHT_ELBOW).z+"\n");
					
				} catch (Exception e) {
					PApplet.println("couldn't write to file, buffer exception");
				}
			}
			
		}
	}