working distribution function