simplify dbtree code