iteritems is not py3k compatible, use items instead