#16 getFullHierarchy implementation