renaming Writer to generator