Changed functions to include G3 argument. Added parameter to MCMC.