first working version of field histograms. #259