Creating hierarchy.