Tree with destructorand test funtion
tree with destructor