added quoting and escaping