error reporting added