added lua mode