factored out to TrainStream, and updated tests