got dirty rectangles working properly