added newlines in alerts
reformated code