only works for the last curve, still.