[PD]: writesf~ implementation