properly set up the subprocess