updated write