refactored error message