 		}
 		
 		bezierPath.lineWidth = lineWidth
-		
 		drawColor.setFill()
 		drawColor.setStroke()
-		
 		bezierPath.stroke()
 	}
 

	override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
		let touch: AnyObject? = touches.first
		lastPoint = touch!.locationInView(self)
		
		counter = 0
	}
	
	override func touchesMoved(touches: Set<NSObject>, withEvent event: UIEvent) {
		let touch: AnyObject? = touches.first
		
		var newPoint = touch!.locationInView(self)
		
		bezierPath.moveToPoint(lastPoint)
		bezierPath.addLineToPoint(newPoint)
		lastPoint = newPoint
		
		++counter
		
		if counter == 100 {
			counter = 0
			renderToImage()
			setNeedsDisplay()
			bezierPath.removeAllPoints()
			println("render to image")
		}
		else {
			setNeedsDisplay()
		}
		
	}
	
	override func touchesEnded(touches: Set<NSObject>, withEvent event: UIEvent) {
		renderToImage()
		setNeedsDisplay()
		bezierPath.removeAllPoints()

		}
		
		bezierPath.lineWidth = lineWidth
		drawColor.setFill()
		drawColor.setStroke()
		bezierPath.stroke()
