       for car in @cars
         color = car.id.color
         @carColors.push color
-        @carLanes[color] = @createCarLane()
+        @carLanes[color] = new CarLane
         @carPositions[color] = new CarPositions
 
-    createCarLane: -> new CarLane @track.normalizedPieceIndex
+    normalizedPieceIndex: ({pieceIndex, lap}) => lap * @track.pieces.length + pieceIndex
 
-    distance: (piecePosition, initialPosition = createPosition(0, 0), carLane = @createCarLane()) ->
+    distance: (piecePosition, initialPosition = createPosition(0, 0), carLane = new CarLane) ->
       if not (carLane instanceof CarLane)
         carLane = @getCarLane carLane
       sum = @track.addPiecesLengthsBetween initialPosition, piecePosition, carLane



    ##################################
    # CarLane
    ##################################
    class CarLane
      constructor: (@normalizedPieceIndex) ->
        @laneAtIndex = []
        @lowestIndex = null

      at: (position) -> @atIndex @normalizedPieceIndex position
      isLowerThanLowestIndex: (index) -> not @lowestIndex? or index < @lowestIndex

      atIndex: (index) ->

              return startLaneIndex: endLane, endLaneIndex: endLane

      add: (position) ->
        index = race.normalizedPieceIndex position
        if @isLowerThanLowestIndex index
          @lowestIndex = index
        @laneAtIndex[index] = position.lane
