py3 fix: dict.iteritems doesn't exist