Added an alert function