anchor.diff:        via(Lvl1,[],Lvl2,Key2,false);
       end_of_table ->
         throw({409,end_of_table});
  -    {NextKey,V} ->
  -      NextVal = unpack_val(V),
  +    {NextKey,NextVal} ->
         ins_overwrite(Lvl2,Key2,NextKey),
         {[{NextKey,NextVal}]}
     end.
   
  -%% data packing
  -pack_val(Val) ->
  -  term_to_binary(Val).
  -unpack_val(Val) ->
  -  binary_to_term(Val).
  -
  -%% key mangling
  -mk_ekey(Bin) ->
  -  string:tokens(binary_to_list(Bin),"/").
  -
  -unmk_ekey(EList) ->
  -  list_to_binary(string:join(EList,"/")).
  -
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   %% handle the table of tables
   
   create_lvl() ->
     ets:new(rets_leveldb_tabs,[named_table,ordered_set,{keypos,2}]).
  +
  +delete_lvl(S,Lvl) ->
  +  ets:delete(S#state.tabs,Lvl#lvl.name).
   
   put_lvl(S,Lvl) ->
     ets:insert(S#state.tabs,Lvl).
  
positive.code:     lvl_close_iter(Iter)
    end.
  
  check_np(prev,invalid_iterator,Iter,Key) ->
    %% lvl_mv_iter/2 moved the iterator to the first record after TK: in
    %% case of TK being the last record, it will return an
    %% invalid_iterator and we have to fix the situation here
    check_np(prev,lvl_mv_iter(Iter,last),Key);
  check_np(prev,{KeyNext,_},Iter,Key) when KeyNext >= Key ->
    %% lvl_mv_iter/2 moved the iterator to the first record not before
    %% TK: we are interested in the previous record, so an additional
    %% iterator step is necessary
    check_np(prev,lvl_mv_iter(Iter,prev),Key);
  check_np(next,{Key,_},Iter,Key) ->
    %% the requested key was in the table: an additional iterator step
    %% is necessary
    check_np(next,lvl_mv_iter(Iter,next),Key);
  check_np(next,KV,_Iter,Key) ->
    check_np(next,KV,Key).
  
  check_np(_,invalid_iterator,_) ->
    end_of_table;
  check_np(OP,{K2,V},K1) when OP =:= next andalso K1 < K2;
                              OP =:= prev andalso K2 < K1 ->
    {K2,V}.
  
  
  deleter(Lvl,Key) ->
    case lvl_get(Lvl,Key) of
  
negative.code:   fold_lvl(S,fun(Lvl,_) -> delete_tab(S,Lvl) end).
  
  %% ::(#state{},list(term(Args)) -> {jiffyable(Reply),#state{}}
  create(S ,[Tab])          -> {create_tab(S,Tab),S}.
  delete(S ,[Tab])          -> {delete_tab(S,Tab),S};
  delete(S ,[Tab,Key])      -> {deleter(assert_lvl(S,Tab),Key),S}.
  sizes(S  ,[])             -> {siz(S),S}.
  keys(S   ,[Tab])          -> {key_getter(assert_lvl(S,Tab)),S}.
  insert(S ,[Tab,KVs])      -> {ins(assert_lvl(S,Tab),KVs),S};
  insert(S ,[Tab,K,V])      -> {ins(assert_lvl(S,Tab),[{K,V}]),S}.
  bump(S   ,[Tab,Key,I])    -> {update_counter(assert_lvl(S,Tab),Key,I),S};
  bump(S   ,[Tab,Key,L,H])  -> {update_counter(assert_lvl(S,Tab),Key,L,H),S}.
  reset(S  ,[Tab,Key,I])    -> {reset_counter(assert_lvl(S,Tab),Key,I),S}.
  next(S   ,[Tab,Key])      -> {next_prev(assert_lvl(S,Tab),next,Key),S}.
  prev(S   ,[Tab,Key])      -> {next_prev(assert_lvl(S,Tab),prev,Key),S}.
  multi(S  ,[Tab,Key])      -> {getter(assert_lvl(S,Tab),multi,Key),S}.
  single(S ,[Tab,Key])      -> {getter(assert_lvl(S,Tab),single,Key),S}.
  via(S    ,[Tab,Key,TabI]) -> {via(assert_lvl(S,TabI),assert_lvl(S,Tab),Key),S}.
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %%% the implementetion
  
  assert_lvl(S,Tab) ->
    case get_lvl(S,Tab) of
      undefined -> throw({404,no_such_table});
      Lvl       -> Lvl
  end.
  
  create_tab(S,Tab) ->
    case get_lvl(S,Tab) of
  