add getting dictionary from tree