marginal sampler implemented