trying to calculate the distribution