         }
         layers.removeAll()
         index = 0
-        maskView.image = image
+        imageView.image = image
         setTransformAnimated(CGAffineTransformIdentity)
         updateUI()
     }
     
     @IBAction func undo() {
         index -= 1
-        maskView.image = image
+        imageView.image = image
         renderLayers(0..<index)
         updateUI()
     }


    override func viewDidLoad() {
        super.viewDidLoad()
        viewMain.addSubview(maskView)
        updateUI()
    }


        self.viewMain.layer.addSublayer(layer)
        return layer
    }()
    lazy var imageView:UIImageView = {
        let view = UIImageView(frame: self.viewMain.bounds)
        view.image = self.image
        view.contentMode = .ScaleAspectFit
