refactored extern files