Added table.maxn to functions