refactored error messages