added character escaping