anchor.diff:  -export([read/1]).
   -export([write/2]).
   
  +-export([lease_renew/1]).
  +-export([lease_handover/2]).
  +
   %% filters and checks for rbr_cseq operations
   %% consistency
  --export([is_valid_state_change/2]).
  +-export([is_valid_state_change/3]).
  +-export([is_valid_renewal/3]).
  +-export([is_valid_handover/3]).
   
   -type lease_id() :: ?RT:key().
  --type lease_aux() :: any().
  +-type lease_aux() ::
  +        any().
  +        %% | {aux, empty}
  +        %% %% split
  +        %% | {aux, jhsgjghs} %% 1. L1: 
  +        %%    | 
  +        %%    %% merge
  +%%.
   
   -record(lease, {
             id      = ?required(lease, id     ) :: lease_id(),
  
positive.code: -author('schintke@zib.de').
  -vsn('$Id:$ ').
  
  %-define(TRACE(X,Y), io:format(X,Y)).
  -define(TRACE(X,Y), ok).
  -include("scalaris.hrl").
  -include("record_helpers.hrl").
  
negative.code:              io_lib:format("lease_db~p", ?RT:get_key_segment(Key, 4)))),
  
      rbrcseq:qwrite(DB, self(), Key,
                     ContentCheck,
                     Value),
      receive
          ?SCALARIS_RECV({qwrite_done, _ReqId, _Round, _Value}, {ok} ) %%;
          %%        ?SCALARIS_RECV({qwrite_deny, _ReqId, _Round, _Value}, {fail, timeout} )
          end.
  
  -spec write(lease_id(), lease_entry()) -> api_tx:write_result().
  write(Key, Value) ->
      write(Key, Value, fun l_on_cseq:is_valid_state_change/3).
  
  %% content checks
  -spec is_valid_state_change(any(), prbr:write_filter(), any()) ->
                                     {boolean(), null}.
  is_valid_state_change(rbr_bottom, _WriteFilter, NewLease) ->
      is_valid_creation(NewLease);
  is_valid_state_change(OldQRLease, WriteFilter, NewLease) ->
      Result =
          case OldQRLease#lease.aux of
              {aux, empty} ->
                  is_valid_renewal(OldQRLease, WriteFilter, NewLease)
                      orelse true; %% list further checks...
              %% {aux, {create, Parent}} ->
              %%     is_valid_create_step2(
              %%        andalso true,
  