using spawn instead of exec so i can use the stdout event