Implementations using a tree structure