remove "this === window" assumption