modified the distribution to bins