code from my training