Added escapeValue method