add helper code for call lua function.