add window to globals