added escapes for dictionary keys