bernoulli_sample now a bajillion times faster.