imigrate to generator-stream