source refactoring