updated tree class