changed the alert to show the result