added lua conditional and auto cding