added plotRectangle