in Lua 5.2, table.getn no longer exists