Made model work with univariate distributions and any sampler