Updated MCMC code