prepare the distribution