compatibility with python2.6: no dict comprehension