generalized the distribution generation