modified Tree, added parent class