optimized spawn flow