anchor.diff:  %%      Config#mt_config.bucket_size.
   -spec p_bulk_build(CurNode::mt_node(), mt_config(), KeyList::mt_bucket())
           -> mt_node().
  -p_bulk_build({_H, Count, LeafCount, _Bkt, Interval, _CL = []}, Config, KeyList) ->
  +p_bulk_build({_H, Count = 1, _LeafCount = 1, _Bkt, Interval, _CL = []}, Config, KeyList) ->
  +    % note: here, Count is not the number of items! (see below)
       ChildsI = intervals:split(Interval, Config#mt_config.branch_factor),
       IKList = keys_to_intervals(KeyList, ChildsI),
       ChildNodes = build_childs(IKList, Config, []),
  -    NCount = lists:foldl(fun(N, Acc) -> Acc + node_size(N) end, 0, ChildNodes),
  -    {nil, Count + NCount, LeafCount, [], Interval, ChildNodes}.
  +    {NCount, NLCount} = lists:foldl(fun(N, {AccN, AccL}) ->
  +                                            {AccN + node_size(N),
  +                                             AccL + get_leaf_count(N)}
  +                                    end, {0, 0}, ChildNodes),
  +    {nil, Count + NCount, NLCount, [], Interval, ChildNodes}.
   
   -spec build_childs([{I::intervals:continuous_interval(), Count::non_neg_integer(),
                        mt_bucket()}], mt_config(), Acc::[mt_node()]) -> [mt_node()].
  
positive.code:     BucketSize = Config#mt_config.bucket_size,
      KeepBucket = Config#mt_config.keep_bucket,
      Node = if Count > BucketSize ->
                    p_bulk_build({nil, 1, -1, [], Interval, []}, Config, Bucket);
                KeepBucket ->
                    % let gen_hash/1 hash the leaves
                    {nil, Count, -1, Bucket, Interval, []};
                true ->
                    % need to hash here since we won't keep the bucket!
                    Hash = run_leaf_hf(lists:ukeysort(1, Bucket), Interval,
  
negative.code: 
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  % @doc Returns an iterator to visit all tree nodes with next/1.
  %      Iterates over all tree nodes from left to right in a deep first manner.
  -spec iterator(Tree::merkle_tree()) -> Iter::mt_iter().
  iterator({merkle_tree, _, Root}) -> [Root].
  