use spool instead of memory