Modificationts to Tree procedure