implements RectangularBox class