adds marginal_distribution method