add some distribution related functions