anchor.diff:  
   -record(mqtt_presence, {user,clients,last_status}).
   
  +-create_mnesia_tables({mnesia,[create_prescence]}).
  +
   %% @doc Mnesia table manipulations.
  +mnesia(create_prescence) ->
  +    mnesia:create_table(mqtt_presence, [{ram_copies, [node()]}, {attributes, record_info(fields,mqtt_presence)}, {type,set}]),
  +    ok = mnesia:wait_for_tables([mqtt_presence], 6000);
   mnesia(Action) ->
  -    mqtt_server:mnesia(Action),
  -    mnesia:create_table(mqtt_presence, [{ram_copies, [node()]}, {attributes, record_info(fields,mqtt_presence)}, {type,set}]).
  +    mqtt_server:mnesia(Action).
   
   apply_setting(Setting) -> mqtt_server:apply_setting(Setting).
   
  
positive.code: 
  update_status(Status,UserId,ClientId) ->
      Transaction = fun() ->
              case mnesia:wread({mqtt_presence,UserId}) of
                  [P=#mqtt_presence{clients=Clients,last_status=PrevStatus}] ->
                      NewClients = sets:add_element(ClientId,Clients),
                      mnesia:write(P#mqtt_presence{clients=NewClients,last_status=Status}),
  
negative.code:         _ ->
              case re:run(Topic, ?ONLINE_REGEX,RegOpts) of
                  {match, [UserId]} ->
                      io:format("ENTERED HERE: online/~p~n", [UserId]),
                      io:format("Message ~p~n", [Message]),
                      {JSON} = jiffy:decode(Payload),
                      Status = proplists:get_value(<<"status">>, JSON),
                      online_status(Message,Context,Status,UserId,ClientId);
  