add pogoscript to this if window is undefined