added function curlhelper