removed the download data component of the histogram function to save time