Rewrite dict creation