setOfWindow now called in renderLoop