refactored error/success msgs