curlsh function