proper class for error handling