Use items instead of iteritems for python3 support