 				for (var vertexId : uint = 0; vertexId < vertexCount; ++vertexId)
 					for (var componentId : uint = 0; componentId < componentCount; ++componentId)
 					{
-						var vertexData		: Vector.<Number>	= vertexComponentDatas[componentId];
-						var componentSize	: uint				= vertexComponentSizes[componentId];
-						var componentOffset	: uint				= vertexComponentOffsets[componentId] + vertexId * vertexComponentDwordsPerVertex[componentId];
+						var vertexData		: Vector.<Number>	= componentDatas[componentId];
+						var componentSize	: uint				= componentSizes[componentId];
+						var componentOffset	: uint				= componentOffsets[componentId] + vertexId * componentDwordsPerVertex[componentId];
 						var componentLimit	: uint				= componentSize + componentOffset;
 						
 						for (var n : uint = componentOffset; n < componentLimit; ++n)

		 */
		public static function mergeMeshes(meshes : Vector.<IMesh>) : IMesh
		{
			var vertexFormat		: VertexFormat				= computeVertexFormat(meshes);
			var vertexComponents	: Vector.<VertexComponent>	= vertexFormat.componentList;
			var mergedMesh			: IMesh						= createMesh(meshes, vertexComponents, vertexFormat);
			
			return mergedMesh;
		}
		
		private static function computeVertexFormat(meshes : Vector.<IMesh>) : VertexFormat
		{
			var newVertexFormat : VertexFormat = meshes[0].vertexStream.format.clone();
			
			for each (var mesh : IMesh in meshes)
				newVertexFormat.intersectWith(mesh.vertexStream.format);
			
			return newVertexFormat;	
		}
		
		private static function createMesh(meshes			: Vector.<IMesh>,
										   vertexComponents	: Vector.<VertexComponent>,
										   vertexFormat		: VertexFormat) : IMesh
		{
			var newIndexStreamData 				: Vector.<uint>				= new Vector.<uint>();
			var newVertexStreamData				: Vector.<Number>			= new Vector.<Number>();
			
			var componentCount					: uint						= vertexComponents.length;
			var vertexComponentOffsets			: Vector.<uint>				= new Vector.<uint>(componentCount, true);
			var vertexComponentSizes			: Vector.<uint>				= new Vector.<uint>(componentCount, true);
			var vertexComponentDwordsPerVertex	: Vector.<uint>				= new Vector.<uint>(componentCount, true);
			var vertexComponentDatas			: Vector.<Vector.<Number>>	= new Vector.<Vector.<Number>>(componentCount, true);
			
			var meshCount : uint = meshes.length;
			for (var i : uint = 0; i < meshCount; ++i)
			{
				var mesh		: IMesh				= meshes[i];
				
				// append index data
				var indexData	: Vector.<uint>		= mesh.indexStream.getIndices();

			vertexFormat ||= _vertexStream.format.clone();
			
			var meshes				: Vector.<IMesh>			= Vector.<IMesh>([this])
			var mergedMesh			: IMesh						= createMesh(meshes, vertexFormat);
			return mergedMesh;
		}
		
