datastructure: tree: adding remaining functionalities of tree