update rectangles