modify gibbs_sampling