added in character escaping