Change dictionary comprehension to old-skool loop