added windows, fixed scanline group logic