TrainingPath.last, inefficient implementation