 
 		clone: (newtrack) ->
 			result = new Section(newtrack, @transform)
-			result._pieces.push piece.clone(result) for piece in @_pieces
+			piece.clone(result) for piece in @_pieces
 			result
 
 		add: (piece) ->

		@section = null
		@_bbox = null

	clone: (newsection) ->
		result = new Piece(@)
		result.section = newsection
		# todo: deep cloning foo needed here
		result.connections = @connections
		result

	setSection: (section) ->
		# remove existing section if there is already one set
		if @section? then @section.remove this


	_sectionStartingIndex: (section) ->
		result=0
		if @_sections.length>0
			for idx in [0...@_sections.indexOf(section)]
				do (idx) =>
					result+=@_sections[idx]._pieces.length
		result

	_index: (piece) ->
