anchor.diff:      gen_server:call({global, reg_name(MyId)}, Message, infinity).
   
   init([MyId]) ->
  +    Ops = ets:new(operations_converger, [set, named_table]),
       {ok, #state{labels_queue=queue:new(),
  -                ops_dict=dict:new(),
  +                ops=Ops,
  +                queue_len=0,
                   myid=MyId}}.
   
  -handle_call({new_stream, Stream, _SenderId}, _From, S0=#state{labels_queue=Labels0, ops_dict=_Ops0}) ->
  +handle_call({new_stream, Stream, _SenderId}, _From, S0=#state{labels_queue=Labels0, queue_len=QL0, ops=Ops, myid=MyId}) ->
       %lager:info("New stream received. Label: ~p", Stream),
  -    case queue:len(Labels0) of
  +    case QL0 of
           0 ->
  -            S1 = flush_queue(Stream, S0);
  +            {Labels1, QL1} = flush_list(Stream, Ops, MyId),
  +            {reply, ok, S0#state{labels_queue=Labels1, queue_len=QL1}}; 
           _ ->
  -            Labels1 = queue:join(Labels0, queue:from_list(Stream)),
  -            S1 = S0#state{labels_queue=Labels1}
  -    end,
  -    {reply, ok, S1};
  +            {Labels1, Total} = lists:foldl(fun(Elem, Sum) ->
  +                                            {queue:in(Elem, Labels0), Sum + 1}
  +                                           end, 0, Stream),
  +            {reply, ok, S0#state{labels_queue=Labels1, queue_len=QL0+Total}}
  +    end;
   
  -handle_call({new_operation, Label, Value}, _From, S0=#state{labels_queue=Labels0, ops_dict=Ops0}) ->
  +handle_call({new_operation, Label, Value}, _From, S0=#state{labels_queue=Labels0, ops=Ops, queue_len=QL0, myid=MyId}) ->
       %lager:info("New operation received. Label: ~p", [Label]),
       case queue:peek(Labels0) of
           {value, Label} ->
               ok = execute_operation(Label, Value),
               Labels1 = queue:drop(Labels0),
  -            S1 = flush_queue(queue:to_list(Labels1), S0);
  +            {Labels2, QL1} = flush_queue(Labels1, QL0-1, Ops, MyId),
  +            {reply, ok, S0#state{labels_queue=Labels2, queue_len=QL1}};
           _ ->
  -            Ops1 = dict:store(Label, Value, Ops0),
  -            S1 = S0#state{ops_dict=Ops1}
  -    end,
  -    {reply, ok, S1}.
  +            true = ets:insert(Ops, {Label, Value}),
  +            {reply, ok, S0}
  +    end.
   
   handle_cast(_Info, State) ->
       {noreply, State}.
  
positive.code:                 false ->
                      noop
              end,
              flush_queue(Rest, S0);
          remote_reply ->
              Payload = Label#label.payload,
              Destination = Payload#payload_reply.to,
  
negative.code:                 false ->
                      noop
              end,
              true;
          update ->
              case ets:lookup(Ops, Label) of
                  [{Label, Value}] ->
                      ok = execute_operation(Label, Value),
                      true = ets:delete(Ops, Label),
                      true;
                  [] ->
                      lager:info("Operation not received for label: ~p", [Label]),
                      false
              end
      end.
  
  