Working on zcurve