anchor.diff:          {ok, undefined} ->
               {ok, {Nodes, StateNum}};
           _ -> {error, invalid_worker_num}
  +    end.
  +
  +%%--------------------------------------------------------------------
  +%% @doc
  +%% Add node to list if it's not there
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec add_node_to_list(node(), [node()]) -> [node()].
  +add_node_to_list(Node, List) ->
  +    case lists:member(Node, List) of
  +        true -> List;
  +        false -> [Node | List]
       end.
positive.code: -spec init_ok(State :: #cm_state{}, SenderNode :: node()) -> #cm_state{}.
  init_ok(State = #cm_state{nodes = Nodes, uninitialized_nodes = InitNodes,
      state_num = StateNum}, SenderNode) ->
      NewInitNodes = lists:delete(SenderNode, InitNodes),
      NewNodes = [SenderNode | lists:delete(SenderNode, Nodes)],
      NewStateNum = StateNum + 1,
      update_node_managers(NewNodes, NewStateNum),
      State#cm_state{nodes = NewNodes, uninitialized_nodes = NewInitNodes,
  
negative.code:             ?info("New node: ~p", [SenderNode]),
              try
                  erlang:monitor_node(SenderNode, true),
                  NewInitNodes = add_node_to_list(SenderNode, InitNodes),
                  gen_server:cast({?NODE_MANAGER_NAME, SenderNode},
                      {heartbeat_ok, State#cm_state.state_num}),
                  State#cm_state{uninitialized_nodes = NewInitNodes}
  