added lua scripting