anchor.diff:  %%
   %% @end
   %%------------------------------------------------------------------------------
  --spec subscribe({binary(), mqtt_qos()} | list(), pid()) -> {ok, list(mqtt_qos())}.
  -subscribe({Topic, Qos}, SubPid) when is_binary(Topic) and is_pid(SubPid) ->
  -    subscribe([{Topic, Qos}], SubPid);
  -
  -%% TODO: 
  -%% call will not work when there are 2000K+ clients, 100+ sub requests/sec...
  -%% will optimize in 0.9.x...
  -%% 
  -subscribe(Topics, SubPid) when is_list(Topics) and is_pid(SubPid) ->
  -    gen_server:call(?SERVER, {subscribe, Topics, SubPid}, infinity).
  +-spec subscribe({binary(), mqtt_qos()} | list()) -> {ok, list(mqtt_qos())}.
  +subscribe({Topic, Qos}) when is_binary(Topic) ->
  +    case subscribe([{Topic, Qos}]) of
  +        {ok, [GrantedQos]} -> {ok, GrantedQos};
  +        {error, Error} -> {error, Error}
  +    end;
  +subscribe(Topics = [{_Topic, _Qos}|_]) ->
  +    subscribe(Topics, self(), []).
  +
  +subscribe([], _SubPid, Acc) ->
  +    {ok, lists:reverse(Acc)};
  +subscribe([{Topic, Qos}|Topics], SubPid, Acc) ->
  +    Subscriber = #topic_subscriber{topic=Topic, qos = Qos, subpid=SubPid},
  +    F = fun() -> 
  +                case trie_add(Topic) of
  +                    ok ->
  +                        mnesia:write(Subscriber);
  +                    {atomic, already_exist} ->
  +                        mnesia:write(Subscriber);
  +                    {aborted, Reason} ->
  +                        {aborted, Reason}
  +                end
  +        end,
  +    case mnesia:transaction(F) of
  +        ok -> subscribe(Topics, SubPid, [Qos|Acc]);
  +        {aborted, Reason} -> {error, {aborted, Reason}}
  +    end.
   
   %%------------------------------------------------------------------------------
   %% @doc
  
positive.code: %% @end
  %%------------------------------------------------------------------------------
  -spec create(binary()) -> {atomic,  Reason :: any()} |  {aborted, Reason :: any()}.
  create(Topic) -> 
      gen_server:call(?SERVER, {create, Topic}).
  
  %%------------------------------------------------------------------------------
  %% @doc
  
negative.code: 
  -export([topics/0,
          create/1,
  		subscribe/1,
  		unsubscribe/1,
  		publish/1,
  		publish/2,
          %local node
  