anchor.diff:          end,
     BoundCounters = lists:duplicate(length(MFBuckets), 0),
     MetricSpec =
  -    [key(Registry, Name, LabelValues), lists:map(Fun, MFBuckets)]
  -    ++ BoundCounters
  -    ++ [0],
  +    [key(Registry, Name, LabelValues), lists:map(Fun, MFBuckets), 0]
  +    ++ BoundCounters,
     ets:insert_new(?TABLE, list_to_tuple(MetricSpec)).
   
  -calculate_histogram_update_positions(Metric, Value) ->
  +calculate_histogram_bucket_position(Metric, Value) ->
     Buckets = metric_buckets(Metric),
  -  BucketPosition = ?BUCKETS_POS + position(Buckets, fun(Bound) ->
  -                                                        Value =< Bound
  -                                                    end),
  -  SumPosition = sum_position(Metric),
  -  {BucketPosition, SumPosition}.
  -
  -generate_update_spec(BucketsStart, BucketsCount) ->
  -  [{Index, 0} ||
  -    Index <- lists:seq(BucketsStart, ?BUCKETS_START + BucketsCount)].
  +  BucketPosition = position(Buckets, fun(Bound) ->
  +                                         Value =< Bound
  +                                     end),
  +  ?BUCKETS_START + BucketPosition.
  +
  +buckets_seq(Buckets) ->
  +  lists:seq(?BUCKETS_START, ?BUCKETS_START + length(Buckets) - 1).
  +
  +generate_update_spec(Buckets) ->
  +  [{Index, 0} || Index <- buckets_seq(Buckets)].
   
   gen_query_placeholder(Index) ->
     list_to_atom("$" ++ integer_to_list(Index)).
   
   gen_query_bound_placeholders(Buckets) ->
  -  [gen_query_placeholder(Index) ||
  -    Index <- lists:seq(?BUCKETS_START, ?BUCKETS_POS + length(Buckets))].
  +  [gen_query_placeholder(Index) || Index <- buckets_seq(Buckets)].
   
   augment_counters([Start | Counters]) ->
     augment_counters(Counters, [Start], Start).
  
positive.code: %%====================================================================
  
  -define(TABLE, ?PROMETHEUS_HISTOGRAM_TABLE).
  -define(BUCKETS_POS, 2).
  -define(BUCKETS_START, 3).
  -define(WIDTH, 16).
  
  %%====================================================================
  
negative.code: %% @private
  collect_metrics(Name, {Labels, Registry, DU, MFBuckets}) ->
    BoundPlaceholders = gen_query_bound_placeholders(MFBuckets),
    QuerySpec = [{Registry, Name, '$1', '_'}, '_', '$3'] ++ BoundPlaceholders,
  
    Fun = fun (Bucket) ->
              prometheus_time:maybe_convert_to_native(DU, Bucket)
  