add edges into cells