rectangles working