Calculating area of rectangles