added more training code