use local vars: window, undefined