Added initial training code