got initial matching and improved contour filtering