move LUA out to a script