anchor.diff:                          {busy, MaxLeaseTime - (erlang:monotonic_time(seconds) - Time)}
                   end
           end,
  -    Result = mnesia:transaction(T),
  -    lager:info("Result: ~p", [Result]),
  -    {ok, Result}.
  -
  -priv_end_lease(_Repo, _Path) ->
  -    ok.
  +    {atomic, Result} = mnesia:transaction(T),
  +    Result.
  +
  +priv_end_lease(Repo, Path) ->
  +    T = fun() ->
  +                case mnesia:read(lease, {Repo, Path}) of
  +                    [] ->
  +                        {error, lease_not_found};
  +                    _ ->
  +                        mnesia:delete({lease, {Repo, Path}})
  +                end
  +        end,
  +    {atomic, Result} = mnesia:transaction(T),
  +    Result.
  +
  +priv_get_leases() ->
  +    T = fun() ->
  +                mnesia:foldl(fun(Lease, Acc) -> [Lease | Acc] end, [], lease)
  +        end,
  +    {atomic, Result} = mnesia:transaction(T),
  +    Result.
  
positive.code: %%--------------------------------------------------------------------
  end_lease(Repo, Path) when is_binary(Repo), is_binary(Path) ->
      gen_server:call(?MODULE, {lease_req, end_lease, {Repo, Path}}).
  
  %%%===================================================================
  %%% gen_server callbacks
  
negative.code: 
  %% API
  -export([start_link/1, stop/0,
           request_lease/3, end_lease/2, get_leases/0]).
  
  %% gen_server callbacks
  -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
  