removed the need to specify "alert": "true" in settings
refactored code
updated
removed alert: true