Consider using `each_pair`, up to you.