Implementation of a tree