changed template

simplified lua coding