added logistic and hinge loss