Small changes to make code work on Collapsed Gibbs Sampler