implement RectangleElement