refactoring project code