creating a histogram