added optional escaping