changed the way dictionaries are created for python 2.6