write out updates