improve handling of strings with commas and quotes