training script, a couple globals...