removed error reporting code