updated training project code (2)