registered function can use *Lua parameter to access lua state