cpp fix for survivor, regularisation for covariance matrix