updated code-generated lua logic to be much faster