changes for standard error handling