integrate trie inserts and deletions in db