Support any hierarchy

moving to support any hierarchy.