Added C version
Added Lua version