update to write methods