modified header, added NewError()