Adding an alert function