added check for success message