updated Tree Class