Removed the alert to check the function