changed from cgi_encode to uri_escape