adds alert functions