added error message as a class