refactoring source tree