refactoring source code