hierarchy utils building