moved logLoss to its own file