Use items instead of iteritems (for Python 3)