changed style of dict creation to work in python 2.6