refactored. removed dupes method on tree.