writing distributed state