refactoring to improve the project structure