Lua solution