add lua linkage and initialization