modified gibbs sampler