added class to store the mcmc chain in every so iteration