anchor.diff:          end,
       HisList = toke_drv:fold(F, [], DB),
       % delete empty entries from HisList and remove all entries in HisList from the DB
  -    lists:foldl(fun(DBEntry, {StateAcc, HL}) -> 
  -                        case db_entry:is_empty(DBEntry) of 
  -                            false -> 
  -                                Key = db_entry:get_key(DBEntry),
  -                                {delete_entry_at_key_(StateAcc, Key, split),
  -                                 [DBEntry | HL]};
  -                            _ -> {StateAcc, HL} 
  -                        end 
  -                end, 
  -                {State, []}, HisList).
  +    HisListFilt =
  +        lists:foldl(
  +          fun(DBEntry, L) ->
  +                  Key = db_entry:get_key(DBEntry),
  +                  toke_drv:delete(DB, erlang:term_to_binary(Key, [{minor_version, 1}])),
  +                  _ = call_subscribers(State, {split, Key}),
  +                  case db_entry:is_empty(DBEntry) of
  +                      false -> [DBEntry | L];
  +                      _     -> L
  +                  end
  +          end, [], HisList),
  +    {State, HisListFilt}.
   
   %% @doc Gets all custom objects (created by ValueFun(DBEntry)) from the DB for
   %%      which FilterFun returns true.
  
positive.code:         -> NewDB::db_t().
  delete_entries_(State = {{DB, _FileName}, _Subscr, _SnapState}, FilterFun) when is_function(FilterFun) ->
      % first collect all toke keys to delete (can not delete while doing fold!)
      F = fun(_KeyToke, DBEntry_, ToDelete) ->
                  DBEntry = erlang:binary_to_term(DBEntry_),
                  case FilterFun(DBEntry) of
                      false -> ToDelete;
                      _     -> [db_entry:get_key(DBEntry) | ToDelete]
                  end
          end,
      KeysToDelete = toke_drv:fold(F, [], DB),
      % delete all entries with these keys
      lists:foldl(fun(Key, StateAcc) ->
                      delete_entry_at_key_(StateAcc, Key)
                      end, State, KeysToDelete);
  delete_entries_(State, Interval) ->
      {Elements, RestInterval} = intervals:get_elements(Interval),
      case intervals:is_empty(RestInterval) of
  
negative.code: 
  %% @doc Adds all db_entry objects in the Data list.
  -spec add_data_(DB::db_t(), db_as_list()) -> NewDB::db_t().
  add_data_(State = {{DB, _FileName}, _Subscr, _SnapState}, Data) ->
      % -> do not use set_entry (no further checks for changed keys necessary)
      _ = lists:foldl(
            fun(DBEntry, _) ->
                ok = toke_drv:insert(DB,
                                     erlang:term_to_binary(db_entry:get_key(DBEntry), [{minor_version, 1}]),
                                     erlang:term_to_binary(DBEntry, [{minor_version, 1}])),
                call_subscribers(State, {write, DBEntry})
            end, ok, Data),
      State.
  
  %% @doc Splits the database into a database (first element) which contains all
  %%      keys in MyNewInterval and a list of the other values (second element).
  