invent getHierarchy