as factory
spawn if opts.script