anchor.diff:    end,
     lists:map(EvaluateLoad, MergedByNode).
   
  -calculate_load(Nodes, Workers) ->
  -  {NodesLoad, Avg} = calculate_node_load(Nodes),
  -  WorkersLoad = calculate_worker_load(Workers),
  -
  +calculate_load(NodesLoad, WorkersLoad) ->
     Merge = fun ({Node, Modules}) ->
       {Node, proplists:get_value(Node, NodesLoad, error), Modules}
     end,
  -  {lists:map(Merge, WorkersLoad), Avg}.
  -
  +  lists:map(Merge, WorkersLoad).
  +
  
positive.code: -spec check_cluster_state(State :: term()) -> NewState when
    NewState ::  term().
  %% ====================================================================
  %% TODO zaproponować algorytm
  check_cluster_state(State) ->
    plan_next_cluster_state_check(),
    State.
  
  %% plan_next_cluster_state_check/0
  %% ====================================================================
  
negative.code:   NewState :: term().
  %% ====================================================================
  increase_state_num(State) ->
    {NodesLoad, AvgLoad} = calculate_node_load(State#cm_state.nodes, short),
    WorkersLoad = calculate_worker_load(State#cm_state.workers),
    Load = calculate_load(NodesLoad, WorkersLoad),
    update_dns_state(State#cm_state.workers, Load, AvgLoad),
  
    NewStateNum = State#cm_state.state_num + 1,
  