changed escapeKeys to escape ts before delimiting + notes 9/16