updated curl.cpp