dragtree refactoring