redesign of CurlWrapper class