Updating to use new data write api.