add window object to code