On Curve Matching