Added mode to bernoulli.jl