Added in the code to split up incoming data and divide it into bins


for the histogram, and then to output to a file.