Working version of rectangles example.