finish write curl class code