     }
     
     @IBAction func undo() {
-        print("undo", index)
         index -= 1
         maskView.image = image
         renderLayers(0..<index)

    private func createShapeLayer() -> CAShapeLayer {
        let layer = CAShapeLayer()
        layer.contentsScale = UIScreen.mainScreen().scale
        layer.lineWidth = 10
        layer.fillColor = UIColor.clearColor().CGColor
        layer.strokeColor = UIColor(red: 1, green: 0, blue: 1, alpha: 1).CGColor
        layer.shadowRadius = 2.0

    }

    @IBAction func redo() {
        renderLayers(index...index)
        index += 1
        updateUI()
