fixed dictionary iteration