updated training script