add assert in DistributionsTest;more code cleanup