Calculating Height of Rectangles