escaping dict properly