added plotCurve