sources refactoring