implemented random scan Gibbs sampler.