implement (contour-based) k-CFA