changed way points are passed from rectangle to pline