added lua version of strategy pattern