add non positive weights, numerically unstable at the moment