using `var global = this`, following Flanagan p.42