add different loss mode