refactoring of ExtractInfo