anchor.diff:  lookup_user(ID) ->
      tts_data:user_get_pid(ID). 
   
  -%% set_pid_for_id(ID,Pid) ->
  -%%    tts_data:user_update_pid(ID,Pid). 
  -
  -delete_user_pid(Pid) ->
  -    tts_data:user_delete_pid(Pid),
  +delete_user(ID) ->
  +    tts_data:user_delete(ID),
       ok.
  
positive.code: 
  
  
  load_or_return_user(User) ->
      load_or_return_user(lookup_user(User),User).
  
  load_or_return_user({ok, Pid}, _User) ->
      {ok, Pid};
  load_or_return_user({error, not_found}, User) ->
      {ok, UserPid} = create_user(User),
      {ok, Data} = retrieve_user_data(User),
      ok = tts_user:set_user_info(Data,UserPid),
      {ok, UserPid};
  load_or_return_user(Error, _User) ->
      Error.
  
  
  create_user(User) ->
      gen_server:call(?MODULE,{create,User}).
  
  create_new_user(User) ->
      {ok, Pid} = tts_user_sup:add_user(User),
      case add_new_user_entry(User,Pid) of
          ok -> 
              {ok, Pid};
          _ ->
              ok = tts_user:stop(Pid),
              lookup_user(User)
      end.
  
  retrieve_user_data(_User) ->
      %TODO: implement
      {ok, #{username => <<"guest">>, uid => 1111, gid => 1111}}.
  
      
  
  %% 
  %% functions with data access
  
negative.code: 
  -spec get_user(UserSuject :: binary(), Issuer :: binary()) -> {ok, pid()} | {error, term()}.
  get_user(UserSubject, Issuer) ->
      load_or_return_user(#{ sub => UserSubject, iss => Issuer}).
  
  -spec user_shutting_down(ID :: binary()) -> ok.
  user_shutting_down(ID) ->
      gen_server:call(?MODULE,{delete_user,ID}).
  
  %% gen_server.
  
  init([]) ->
  	{ok, #state{}}.
  
  handle_call({create,UserId}, _From, State) ->
      Result = create_new_user(UserId),
      {reply, Result, State};
  handle_call({delet_user,ID}, _From, State) ->
      delete_user(ID),
      {reply, ok, State};
  handle_call(_Request, _From, State) ->
  	{reply, ignored, State}.
  