anchor.diff:              {undefined, Histogram1}
       end.
   
  +%% calculates list of moves to balance turn I of Map.
   balance_nodes(Bucket, Map, Histograms, I) when is_integer(I) ->
       VNF = [{V, lists:nth(I, Chain), lists:sublist(Chain, I-1)} ||
                 {V, Chain} <- misc:enumerate(Map, 0)],
  
positive.code:             ok
      end.
  
  
  new_replicas(Bucket, EjectNodes, Map, Histograms) ->
      new_replicas(Bucket, EjectNodes, Map, Histograms, 0, []).
  
  
negative.code:     ns_bucket:set_map(Bucket, Map1).
  
  
  %% for each replication turn in Map returns list of pairs {node(),
  %% integer()} representing histogram of occurences of nodes in this
  %% replication turn. Missing Servers are represented with counts of 0.
  %% Nodes that are not present in Servers are ignored.
  histograms(Map, Servers) ->
      Histograms = [lists:keydelete(
                      undefined, 1,
  