change "dict comprehension" to python2.6 compatibility