updated writing out