WIP: tree class
WIP: tree algorithm