classification with histograms implemented