refactored the project