Added a call back function for alert

Title says all