modified spark sketch to use the RestClient library