flash error messages implemented