fix.. iteritems() is needed to iterate dictionary