You might find this post helpful where I was trying to explain the mechanism of DensityDist.
DensityDist