working on fixing rectangles