fix a bug in swicth calling Bernoulli; add an example of Bernoulli simulation for probability of occurrence (#8)