add a function to Lua interface for advanced usage