added numerically stable Gibbs method