name extractor refactor