refactoring source structure