anchor.diff:  remove_session_from_topic(Session,TopicId,#state{t=T,sess=Sessions}) ->
     SessionId = Session#session.id,
     [Topic] = ets:lookup(T,TopicId),
  -
  -  case lists:member(TopicId,Session#session.subscriptions) of
  -    false ->
  -      not_found;
  -
  -    true ->
  -      ets:update_element(T,TopicId,{#topic.subscribers,lists:delete(SessionId,Topic#topic.subscribers)}),
  -      ets:update_element(Sessions,SessionId,{#session.subscriptions,lists:delete(TopicId,Session#session.subscriptions)}),
  -      ok
  -  end.
  +  ets:update_element(T,TopicId,{#topic.subscribers,lists:delete(SessionId,Topic#topic.subscribers)}),
  +  ets:update_element(Sessions,SessionId,{#session.subscriptions,lists:delete(TopicId,Session#session.subscriptions)}),
  +  ok.
   
   
   -spec create_procedure(Url :: binary(), Options :: list(), Session :: #session{}, State :: #state{} ) -> {ok,non_neg_integer()}.
  
positive.code: -spec unregister_procedure( Pid :: pid(), ProcedureId :: non_neg_integer(), State :: #state{}) -> {ok} | {error,Details :: list(), Reason :: atom()}.
  unregister_procedure(Pid,ProcedureId,State) ->
    Session = get_session_from_pid(Pid,State),
    case remove_session_from_procedure(Session,ProcedureId,State) of
      ok -> {ok};
      not_found -> {error,[{}],no_such_registration}
    end.
  
  
  
negative.code: -spec unsubscribe_from_topic(Pid :: pid(), SubscriptionId :: non_neg_integer(), State :: #state{}) -> {ok} | {error,no_such_subscription,list()}.
  unsubscribe_from_topic(Pid,SubscriptionId,State) ->
    Session = get_session_from_pid(Pid,State),
    case lists:member(SubscriptionId,Session#session.subscriptions) of
      false ->
        {error,[{}],no_such_subscription};
  
      true ->
        ok = remove_session_from_topic(Session,SubscriptionId,State),
        {ok}
    end.
  
  
  