implement automatic testing
simplify MCMC portion to increase maintainability