new 2D histogram implementation