implementing MCMC by brushfire.