added unary training.