replace exec by spawn