adding success and failure alerts