add window check