anchor.diff:                                              Acc ++ [Id]
                                       end
                                   end, [], Value),
  -            {reply, {ok, Group}, S0};
  -        error ->
  -            {reply, {error, unknown_key}, S0}
  +            {reply, {ok, Group}, S0}
       end;
   
  -handle_call({filter_stream_leaf_id, Stream0}, _From, S0=#state{tree=Tree, nleaves=NLeaves, myid=MyId}) ->
  +handle_call({filter_stream_leaf_id, Stream0}, _From, S0=#state{tree=Tree, nleaves=NLeaves, myid=MyId, groups=Groups, paths=Paths}) ->
       Row = dict:fetch(MyId, Tree),
       Internal = find_internal(Row, 0, NLeaves),
       Stream1 = lists:foldl(fun({BKey, Elem}, Acc) ->
                               {Bucket, _Key} = BKey,
  -                            case interested(Internal, Bucket, MyId, S0) of
  +                            case interested(Internal, Bucket, MyId, Groups, NLeaves, Paths) of
                                   true ->
                                       Acc ++ [Elem];
                                   false ->
  
positive.code:                                             _ -> Acc ++ [Elem]
                                          end
                                         end, [], Links),
              LinksExpanded = expand_links(FilteredLinks, Id, S0),
              intersect(LinksExpanded, Group)
      end.
              
  expand_links([], _PreId, _S0) ->
      [];
                 
  expand_links([H|T], PreId, S0=#state{nleaves=NLeaves, paths=Paths}) ->
      case is_leaf(H, NLeaves) of
          true ->
              [H] ++ expand_links(T, PreId, S0);
          false ->
              ExtraPath = dict:fetch(H, Paths),
              FilteredExtraPath = lists:foldl(fun(Elem, Acc) ->
  
negative.code:     P3 = dict:store(8,[3,9,10],P2),
      P4 = dict:store(9,[4,5,8],P3),
      P5 = dict:store(10,[7,8],P4),
      Result1 = expand_links([6], 0, 6, P5),
      ?assertEqual([1,2,3,4,5], lists:sort(Result1)),
      Result2 = expand_links([7], 2, 6,P5),
      ?assertEqual([0,1,3,4,5], lists:sort(Result2)),
      Result3 = expand_links([7,8], 10, 6, P5),
      ?assertEqual([0,1,2,3,4,5], lists:sort(Result3)),
      Result4 = expand_links([7], 10, 6, P5),
      ?assertEqual([0,1,2], lists:sort(Result4)).
  
  intersect_test() ->
  