implemented error messages