adding a bit to the lua handler and working on main program flow