Adding train functions woo