added test
fixed dictionary iteration