add escaping into temp api functions