consolidated back into distributions.py