More tree related implementation