now with error reporting