added preliminary version of hist_loss()