adding success and error messages