finalizing MCMC and SA code and adding printouts