modify function materials_losses