removed echo from generate_training