incorporating error messages