not sure how this got lost again, but use `window` as the global context