encapsculated logic to curl/config functions