graph drawing tool
table.length = function(h)
	-- length of a table (not just the array side)
	local result = 0
	for _ in pairs(h) do
		result = result+1
	end
	return result
end