some func for libcurl