hist: new rebinned method for all rebinning cases and for all dimensions