modified:   add function escape_string