contour based matching works start to end for basic case