Added hierarchy extension method