clean up Bernoulli distribution