Modify thet function of trim-and-notify