Changed the dictionary comprehension to a dictionary generated by a list comprehension to be compatible to python version <= 2.6