flash error message displays
refactoring error messages