insert the function into the alerts

insert the function into the alerts