function contains(G,M)for G,t in pairs(G)do if t==M then return true end end return false end
--helpfully checks a table for a specific value
function contains(t, v)
	for _, val in pairs(t) do
		if val == v then
			return true
		end
	end
	return false
end
