complete but untested gibbs sampler