first add training code