hierchy extractor