added function with params for trees of distributions