update loss type