passed window to closure