add lua infrastructure for scripting use