add error-handling capabilities.