refactor External