added code to dump data to Cloudant