for training, shared for self.