refactoring for alert messages