added function of loss 5 points