pretty close, but having a problem where the browser window attributes are randomly reset