             mtkView.delegate = self
             context.pixelFormat = mtkView.colorPixelFormat
         }
+        // This is an alternative way to create a script object (Beta)
+        let script = VSScript()
+            .mono()
+        runtime = script.compile(context: context)
     }
     
     @IBAction func importMovie(_ sender:UIBarButtonItem) {

class SampleViewController3: UIViewController {
    var context:VSContext = VSContext(device: MTLCreateSystemDefaultDevice()!)
    var runtime:VSRuntime?
    var player:AVPlayer?
    lazy var renderer:VSRenderer = VSRenderer(context:self.context)

    override func viewDidLoad() {
        super.viewDidLoad()

                if status == AVKeyValueStatus.loaded {
                    print("didFinish, loaded")
                    let settings:[String:Any] = [kCVPixelBufferPixelFormatTypeKey as String:kCVPixelFormatType_32BGRA]
                    self.output = AVPlayerItemVideoOutput(outputSettings: settings)
                    self.playerItem = AVPlayerItem(asset: asset)
                    self.playerItem!.add(self.output!)
                    self.player = AVPlayer(playerItem: self.playerItem!)
                    self.player!.addPeriodicTimeObserver(forInterval: CMTime(seconds:1.0/30.0, preferredTimescale:600), queue: DispatchQueue.main, using: { (time) in
                        print("time", time)
                        guard let pixelBuffer = self.output?.copyPixelBuffer(forItemTime: self.playerItem!.currentTime(), itemTimeForDisplay: nil) else {
                            print("failed to copy pixel buffer")
                            return
                        }
                        
                        let width = CVPixelBufferGetWidth(pixelBuffer), height = CVPixelBufferGetHeight(pixelBuffer)
                        var metalTexture:CVMetalTexture? = nil
                        let status = CVMetalTextureCacheCreateTextureFromImage(nil, self.textureCache, pixelBuffer, nil,
                                                                               self.context.pixelFormat, width, height, 0, &metalTexture)
                        if let metalTexture = metalTexture, status == kCVReturnSuccess {
                            self.context.set(sourceImage: metalTexture)
                        } else {
                            print("VSVS: failed to create texture")
                        }
                        
                    })
                    self.player!.play()
                }
            }
        }
