writing up postierior mcmc sampler