refactor project code