refactored the training project