update writing with lua