updates to abstract the curl functionality to a wrapper