Gibbs sampler and log-likelihood working