Added contour regularization