rewrote probability.jl.