anchor.diff:  -spec get_load_std_deviation(Which::load(), Ring::ring()) -> float().
   get_load_std_deviation(Which, Ring) ->
       FilteredRing = lists:filter(fun (X) -> is_valid(X) end, Ring),
  -    Average = get_average_load(Which, FilteredRing),
  -    math:sqrt(lists:foldl(fun (Load, Acc) ->
  -                                   Acc + (Load - Average) * (Load - Average)
  -                          end, 0,
  -                          lists:map(fun(Node) -> get_load(Which, Node) end,
  -                                    FilteredRing)) / length(FilteredRing)).
  +    case length(FilteredRing) of
  +        0 -> 0.0;
  +        _ ->
  +            Average = get_average_load(Which, FilteredRing),
  +            math:sqrt(lists:foldl(fun (Load, Acc) ->
  +                                          Acc + (Load - Average)
  +                                              * (Load - Average)
  +                                  end, 0,
  +                                  lists:map(fun(Node) ->
  +                                                    get_load(Which, Node)
  +                                            end,
  +                                            FilteredRing))
  +                      / length(FilteredRing))
  +    end.
   
   -spec get_load(Which::load(), ring_element()) -> node_details:load().
   get_load(Which, {ok, Details}) ->
  
positive.code: -spec get_average_rt_size(Ring::ring()) -> float().
  get_average_rt_size(Ring) ->
      FilteredRing = lists:filter(fun (X) -> is_valid(X) end, Ring),
      get_total_rt_size(FilteredRing) / length(FilteredRing).
  
  -spec get_rt_size_std_deviation(Ring::ring()) -> float().
  get_rt_size_std_deviation(Ring) ->
      FilteredRing = lists:filter(fun (X) -> is_valid(X) end, Ring),
      Average = get_average_rt_size(FilteredRing),
      math:sqrt(lists:foldl(fun (RTSize, Acc) ->
                                     Acc + (RTSize - Average) * (RTSize - Average)
                            end, 0,
                            lists:map(fun get_rt/1, FilteredRing)) / length(FilteredRing)).
  
  -spec get_rt(ring_element()) -> node_details:rt_size().
  get_rt({ok, Details}) ->
  
negative.code: -spec get_average_load(Which::load(), Ring::ring()) -> float().
  get_average_load(Which, Ring) ->
      FilteredRing = lists:filter(fun (X) -> is_valid(X) end, Ring),
      case length(FilteredRing) of
          0 -> 0.0;
          _ ->
              get_total_load(Which, FilteredRing) / length(FilteredRing)
      end.
  
  -spec get_memory_usage(Ring::ring()) -> float().
  get_memory_usage(Ring) ->
      FilteredRing = lists:filter(fun (X) -> is_valid(X) end, Ring),
      case length(FilteredRing) of
          0 -> 0.0;
          _ ->
              lists:foldl(fun (X, Sum) -> X + Sum end, 0,
                          lists:map(fun get_memory/1, FilteredRing))
                  / length(FilteredRing)
      end.
  
  -spec get_max_memory_usage(Ring::ring()) -> node_details:memory().
  get_max_memory_usage(Ring) ->
  