fixed syntax issue in python3 using iteritems for a dict. Changed to just .items() to get the key value pairs.