iMagine implimentation in Lua