updated MCMC code and write-up