partially wrote write()