 		# Create a Group using the mask and the background
 		pieceGroup = new P.Group pieceEdge, pieceBackground, pieceEdge.clone()
 		pieceGroup.clipped = true
-		pieceGroup.bounds.x = i * rectangle.width
-		pieceGroup.bounds.x -= difference if pieceEdges[i].left > 0
+		pieceGroup.bounds.x = (i % 3) * rectangle.width
+		pieceGroup.bounds.x -= differenceHorizontally if pieceEdges[i].left > 0
+		pieceGroup.bounds.y = Math.floor(i / 3) * rectangle.height
+		pieceGroup.bounds.y -= differenceVertically if pieceEdges[i].top > 0
 		pieceGroup.strokeColor = 'black'
 		piecesLayer.addChild pieceGroup
 

		puzzle.moveTo 0, 0

		# Top edge
		puzzle.lineTo new P.Point W, 0
		
		# Right edge

		puzzle.lineTo new P.Point W, H
		
		# Bottom edge
		if pieceEdges[i].bottom is 1

			# Outwards
