HISTOGRAM PROCESSING