converted {a:b for b in c} syntax so works with python 2.7