stil working on generating the marginal distribution over the small groups